Skip to content

Make Plot more geojson-aware #1745

@Fil

Description

@Fil

Only the geo mark knows that data can be a FeatureCollection of a GeometryCollection. This makes pivoting from Plot.geo to Plot.dot a 3-changes operation:

Plot.geo(countries) => Plot.dot(countries .features, Plot.centroid())

In the spirit of #1743/#1744 we could have all the marks:

  1. accept geo collections as data, and add a geometry: d => d option
  2. apply the centroid initializer if they consume x, y and there is a geometry (and no x, y or frameAnchor); similarly, apply a bounds initializer if they consume x1, y1, x2, y2 and …

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions