vega / vega-lite

A concise grammar of interactive graphics, built on Vega.
https://vega.github.io/vega-lite/
BSD 3-Clause "New" or "Revised" License
4.64k stars 603 forks source link

Control which geo data sources are passed to projection fit. #4893

Open jheer opened 5 years ago

jheer commented 5 years ago

Right now we have an all-or-nothing approach to automatic configuration of projection scale and translate parameters: either all geo data is passed to the fitting function or, in the case of custom projections, there is no auto-fitting at all.

I think we could support an intermediate option in which selected data sources (e.g., visualized points on a map) drive the fitting but other sources (e.g., a base map that may vastly exceed the other data points) are not. The basic logic seems straightforward, and we would want to enable clipping (just as we do for custom projections) when only fitting to a subset of the data.

The main question in my mind is what the VL syntax should be for specifying this behavior.

Thoughts? @domoritz @kanitw @willium

domoritz commented 5 years ago

I like the idea of a projectionFit or fitProjection mark-level property that defaults to true.

jheer commented 5 years ago

Oops, flagging @jwoLondon as well in case he has any thoughts on the matter.