Skip to content

chore: Update geo trace fitbounds default to 'locations'#7895

Draft
camdecoster wants to merge 9 commits into
v4.0from
cam/7855/update-geo-fitbounds-default
Draft

chore: Update geo trace fitbounds default to 'locations'#7895
camdecoster wants to merge 9 commits into
v4.0from
cam/7855/update-geo-fitbounds-default

Conversation

@camdecoster

@camdecoster camdecoster commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description

Updates the fitbounds default value to "locations" for geo traces. Also fixes (previously unknown) bug related to using zoom buttons with fitbounds active.

Closes #7855

Changes

  • Changes default
  • Update schema and types
  • Persists view attributes to layout
  • Updates tests per above changes

Videos

Before (fitbounds: false, default)

Screencast.From.2026-07-09.15-30-04.mp4

Before (fitbounds: "locations")

Screencast.From.2026-07-09.16-51-23.mp4

After (fitbounds: "locations", default)

Screencast.From.2026-07-09.15-29-05.mp4

Testing

  • Be on master
  • Load Plotly devtools
  • Open the mock geo_orthographic
  • Note that the plot is centered on the US/Canada
  • Switch to this branch
  • Open the same mock
  • Note that the plot is now centered on Asia

Notes

  • fitbounds used to default to false. This changes the default to "locations".
  • Any plot that wants to maintain the current view calculation will need to pass false to fitbounds
  • This update matches the convention that most mapping libraries use
  • The bug (fixed in this PR) meant that zoom button clicks had no effect on the view when fitbounds was active

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant