Skip to content

docs: Add plotly.js v4 migration guide - #455

Open
camdecoster wants to merge 25 commits into
masterfrom
cam/add-v4-migration-guide
Open

docs: Add plotly.js v4 migration guide#455
camdecoster wants to merge 25 commits into
masterfrom
cam/add-v4-migration-guide

Conversation

@camdecoster

@camdecoster camdecoster commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Description

Creates a new Guides section, moves the v3 migration guide, and ddds the plotly.js v4 migration guide.

Closes plotly/plotly.js#7831.
Closes plotly/plotly.js#7841.

Changes

  • Creates Guides section
  • Moves/renames v3 migration guide
  • Adds v4 migration guide
  • Updates existing docs to reflect v4 changes
  • Adds new docs for new features

Testing

  • Be on this branch
  • Build the docs
  • Click around the Guides and make sure everything looks okay

Notes

  • The v3 guide was in the Fundamentals section, which doesn't really fit
  • I added a redirect for the old v3 guide link
  • The styles aren't great, but fixing that will be part of a different project

@camdecoster camdecoster changed the title docs: Add v4 migration guide docs: Add plotly.js v4 migration guide Jul 17, 2026
Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated
Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated

@ndrezn ndrezn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest adding some grouping by topic, like for example. Right now it's a just a long, ungrouped list so topics come and go back and forth.

Maybe something like:

  1. Environment & tooling

Setup-level changes that hit before you touch a figure.

  • Minimum Node.js version
  • TypeScript types
  1. Removed features

Things that are simply gone and need code deleted/renamed.

  • Chart Studio APIs removed
  • Mapbox traces and subplots removed (maybe could go in maps section? but it's top item).
  1. Dependency changes

Third-party library swaps whose output shifts even with identical input — the
"your figure looks slightly different and you didn't change anything" bucket.

  • Color library swap (tinycolor2 → color)
  • Country name lookup (country-regex → country-iso-search)
  • Sankey layout algorithm update
  1. Maps & geo

By far the biggest cluster — all the MapLibre/geo framing behavior.

  • Scattermap icon defaults
  • Map subplots auto-frame to data
  • Geo subplots auto-frame by default
  • Geo fitbounds framing for antimeridian features
  • Geo subplot zoom limits
  1. Cartesian & shapes

The remaining rendering-behavior changes that aren't map-related.

  • Shape legend marker outlines honor line.dash
  • Overlaying axis tickmode defaults to 'sync'

Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated
Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated
Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated
`tickmode` continues to default to `'auto'` on the overlaying axis.
Sync'ing tick positions to category slots is almost never the intent.

### Opting out

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be a sub header

/ `pitch` in the layout — auto-framing steps aside and preserves the
chosen view across further data changes.

### Opting out

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be one level deeper

Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated
Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated
Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated
Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated
Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated
Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated
Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated
Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated
Comment on lines +623 to +629
### Antimeridian data

For data that straddles the antimeridian (points on both sides of ±180°),
the auto-frame picks the compact crossing range rather than the
long-way-around view. For example, `lon: [131.8855, -179]` frames as
`[131.8855, 181]` (a ~49° span across the antimeridian) instead of the
naive `[-179, 131.8855]` (~311° the wrong way).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Antimeridian data
For data that straddles the antimeridian (points on both sides of ±180°),
the auto-frame picks the compact crossing range rather than the
long-way-around view. For example, `lon: [131.8855, -179]` frames as
`[131.8855, 181]` (a ~49° span across the antimeridian) instead of the
naive `[-179, 131.8855]` (~311° the wrong way).
### Data that crosses the antimeridian
For data that straddles the antimeridian (points on both sides of ±180°, in the middle of the Pacific Ocean),
the auto-frame picks the compact crossing range rather than the
long-way-around view. For example, `lon: [131.8855, -179]` frames as
`[131.8855, 181]` (a ~49° span across the antimeridian) instead of the
naive `[-179, 131.8855]` (~311° the wrong way).

Would be nice to have a visual example here

Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated
Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated
Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated
Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated
Comment thread _posts/plotly_js/guides/migrating-to-v4/2026-07-17-migrating-to-v4.md Outdated
Comment thread _posts/plotly_js/guides/whats-new-in-v4/2026-07-20-whats-new-in-v4.md Outdated
Comment thread _posts/plotly_js/guides/whats-new-in-v4/2026-07-20-whats-new-in-v4.md Outdated
Comment thread _posts/plotly_js/guides/whats-new-in-v4/2026-07-20-whats-new-in-v4.md Outdated
Comment thread _posts/plotly_js/guides/whats-new-in-v4/2026-07-20-whats-new-in-v4.md Outdated
Comment thread _posts/plotly_js/guides/whats-new-in-v4/2026-07-20-whats-new-in-v4.md Outdated
Comment thread _posts/plotly_js/guides/whats-new-in-v4/2026-07-20-whats-new-in-v4.md Outdated
Comment thread _posts/plotly_js/guides/whats-new-in-v4/2026-07-20-whats-new-in-v4.md Outdated
Comment thread _posts/plotly_js/guides/whats-new-in-v4/2026-07-20-whats-new-in-v4.md Outdated
Comment thread _posts/plotly_js/guides/whats-new-in-v4/2026-07-20-whats-new-in-v4.md Outdated
Comment thread _posts/plotly_js/guides/whats-new-in-v4/2026-07-20-whats-new-in-v4.md Outdated
Comment thread _posts/plotly_js/guides/whats-new-in-v4/2026-07-20-whats-new-in-v4.md Outdated
Comment thread _posts/plotly_js/guides/whats-new-in-v4/2026-07-20-whats-new-in-v4.md Outdated
Comment thread _posts/plotly_js/guides/whats-new-in-v4/2026-07-20-whats-new-in-v4.md Outdated
Comment thread _posts/plotly_js/guides/whats-new-in-v4/2026-07-20-whats-new-in-v4.md Outdated
Comment thread _posts/plotly_js/guides/whats-new-in-v4/2026-07-20-whats-new-in-v4.md Outdated
Comment thread _posts/plotly_js/guides/whats-new-in-v4/2026-07-20-whats-new-in-v4.md Outdated
Comment thread _posts/plotly_js/guides/whats-new-in-v4/2026-07-20-whats-new-in-v4.md Outdated
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.

Update docs per v4 changes Add migration guide for v3 to v4

5 participants