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
[BUG]: geo.fitbounds falls back to the world view when locations mix antimeridian-crossing and normal features #7943
layout.geo.fitbounds defaults to 'locations' in v4 (it was false in v3). When a choropleth (or scattergeo with locations) plots several locations and at least one crosses ±180°, the auto-fit resolves to a longitude span wider than the globe, so the subplot renders the default world view instead of a fit.
Affected territories are the ones whose features cross ±180°: USA (Aleutians), RUS, FJI, NZL, ATA. USA plus neighboring countries is a very common figure. This only appears when a crossing feature is combined with non-crossing ones.
Note that the view shows the world and splits the USA up
Notes
computeBbox returns east unwrapped past 180° for a crossing feature (USA → 172.6 … 293.0), while non-crossing features stay in negative degrees (CAN → -141.0 … -52.6)
calcGeoJSON pushes both into one flat array and calls findExtremes, so min = -141, max = 293 → 434°
The existing compaction helper in src/plots/geo/geo.js is unreachable here: it is skipped for any choropleth and for any trace with locations, and it operates on point longitudes rather than interval endpoints
Activity