Uh oh!
There was an error while loading. Please reload this page.
docs: Add plotly.js v4 migration guide - #455
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ndrezn
left a comment
There was a problem hiding this comment.
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:
- Environment & tooling
Setup-level changes that hit before you touch a figure.
- Minimum Node.js version
- TypeScript types
- 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).
- 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
- 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
- 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'
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| `tickmode` continues to default to `'auto'` on the overlaying axis. | ||
| Sync'ing tick positions to category slots is almost never the intent. | ||
| ### Opting out |
| / `pitch` in the layout — auto-framing steps aside and preserves the | ||
| chosen view across further data changes. | ||
| ### Opting out |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| ### 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). |
There was a problem hiding this comment.
| ### 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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| Matching ignores case, accents, and punctuation, so `'Cote d'Ivoire'`, `'Türkiye'`, and `'St. Kitts and Nevis'` all | ||
| resolve. See the library's |
There was a problem hiding this comment.
It might be more useful here to give several examples which all resolve to the same country name (but with different case/accents/punctuation)
There was a problem hiding this comment.
I think that will be clear if they click on the link.
Uh oh!
There was an error while loading. Please reload this page.
| - avoid using random or dummy data as much as humanly possible! Should only be a last resort. | ||
| - upload data files to https://github.com/plotly/datasets as importing data rather than pasting a large chunk of data in the tutorial creates a cleaner example. | ||
| - use `var config = {mapboxAccessToken: "your access token"};` if your chart requires Mapbox authentication. `"your access token` will replaced by Plotly's private token at build time. In development mode, you will need to create a `_data/mapboxtoken.yml` file and paste Plotly's non-URL restricted Mapbox key into it. This is available in 1Password. | ||
| - map examples must not require an API key. The `map` traces (`scattermap`, `choroplethmap`, `densitymap`) use open tile providers, and the `mapboxAccessToken` config option was removed in Plotly.js v4. Keep the example's `layout.map.style` set to a built-in style name or to a keyless style URL, so the chart renders for everyone reading the page. If you want to document a provider that does need a key, put that URL in `markdown_content` as a code snippet for the reader to copy and add their own key to — don't put it in the example itself, where a placeholder key means the rendered chart has no tiles and a real key would be committed to a public repo. |
There was a problem hiding this comment.
If you want to document a provider that does need a key, put that URL in
markdown_contentas a code snippet for the reader to copy and add their own key to — don't put it in the example itself, where a placeholder key means the rendered chart has no tiles and a real key would be committed to a public repo.
Not a huge deal, but I don't totally understand these instructions (maybe I would understand better if I worked more closely with the docs).
There was a problem hiding this comment.
I think you'd understand if you reviewed some of the tutorials this statement is referencing.
emilykl
commented
Aug 7, 2026
@camdecoster I left a bunch of very minor comments on the new docs pages. Looks good. |
Co-authored-by: Emily KL <4672118+emilykl@users.noreply.github.com>
Co-authored-by: Emily KL <4672118+emilykl@users.noreply.github.com>
| Matching ignores case, accents, and punctuation, so `'Cote d'Ivoire'`, `'Türkiye'`, and `'St. Kitts and Nevis'` all | ||
| resolve. See the library's |
There was a problem hiding this comment.
I think that will be clear if they click on the link.
| - avoid using random or dummy data as much as humanly possible! Should only be a last resort. | ||
| - upload data files to https://github.com/plotly/datasets as importing data rather than pasting a large chunk of data in the tutorial creates a cleaner example. | ||
| - use `var config = {mapboxAccessToken: "your access token"};` if your chart requires Mapbox authentication. `"your access token` will replaced by Plotly's private token at build time. In development mode, you will need to create a `_data/mapboxtoken.yml` file and paste Plotly's non-URL restricted Mapbox key into it. This is available in 1Password. | ||
| - map examples must not require an API key. The `map` traces (`scattermap`, `choroplethmap`, `densitymap`) use open tile providers, and the `mapboxAccessToken` config option was removed in Plotly.js v4. Keep the example's `layout.map.style` set to a built-in style name or to a keyless style URL, so the chart renders for everyone reading the page. If you want to document a provider that does need a key, put that URL in `markdown_content` as a code snippet for the reader to copy and add their own key to — don't put it in the example itself, where a placeholder key means the rendered chart has no tiles and a real key would be committed to a public repo. |
There was a problem hiding this comment.
I think you'd understand if you reviewed some of the tutorials this statement is referencing.
There was a problem hiding this comment.
This isn't actually a rename, but git is seeing it that way. 🤷
There was a problem hiding this comment.
This isn't actually a rename, but git is seeing it that way. 🤷
jendrikw
commented
Aug 26, 2026
v4 was released two days ago, please finish this |
Uh oh!
There was an error while loading. Please reload this page.
Description
Creates a new Guides section, moves the v3 migration guide, and ddds the plotly.js v4 migration guide.
Closesplotly/plotly.js#7831.
Closesplotly/plotly.js#7841.
Changes
Testing
Notes