You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Open map figures on the data, not on the whole world #106
Every map figure (geo_histogram2d, geo_line) opens on the whole world, centered on lat 0 and lon 0 at zoom 1. The data can be anywhere. The user must pan and zoom to find it, for example to Belgium for data around Brussels.
Cause
This is not a Plotly default. PlotlyAdapter sets the view for every figure with a geo trace (flexviz/adapters/plotly_adapter.py:399-403):
The plotly.js 4.1.1 upgrade (#105) does not change this. Plotly 4 can fit a map to its data (plotly.js #7884), but only when the layout sets no center and zoom.
Constraints
The first map relayout writes "{figure_uid}/coordinates" into the viewport. geo_histogram2d bins the visible area, so the start view decides the first grid.
A shared or imported spec with a stored map viewport must keep its view.
Reset must go back to the start view.
Options to evaluate
The client fits the map to the first delta. A geo_histogram2d delta already has lat_edges and lon_edges, and a geo_line delta has its points. To check: does the first grid cover the data bounds?
Remove the fixed center and zoom, and let Plotly 4 fit the map. To check: what the fit does with an empty trace, and with a stored viewport.
Activity