Skip to content

Conversation

@cpsievert
Copy link
Collaborator

@cpsievert cpsievert commented Jan 19, 2026

Closes #2463

Summary

Upgrades plotly.js from v2.11.1 to v2.25.2 (35 releases). This is a significant update that includes bug fixes, performance improvements, and new features.

Investigation Results

All 35 releases were reviewed for potential regressions. No breaking changes were identified - all changes are either bug fixes, performance improvements, or additive features.

Potential Concerns Investigated (All Clear)

Concern Finding
Pie chart rotation behavior (v2.15.0) Schema change only - no behavioral impact
Selection event changes (v2.13.x) Improvement - events now emit more consistently
SVG export scaling (v2.18.1) Bug fix improving SVG export quality
Multiple legend defaults (v2.22.0+) Additive feature, no default changes
Automargin behavior (v2.13.0, v2.15.0) Additive flaglist options only
Hover label overlap (v2.19.0) Bug fix improving hover label positioning
Bundle size (v2.17.0 webpack switch) Actually decreased ~90KB
Static plot interactions (v2.15.0, v2.16.5) Bug fix ensuring static plots are truly static
Heatmap rendering (v2.21.0-v2.23.1) Bug fixes and performance improvements

Notable Improvements

  • Security: v2.25.2 fixes potential prototype pollution
  • Performance: Bundle size reduced, heatmap rendering optimized
  • Bug fixes: Many fixes for hover, selection, legend, and rendering issues

Key New Features Available

These don't change existing behavior but are now available:

  • Multiple legends (legend2, legend3, etc.) - v2.22.0
  • Shape labels and templates - v2.19.0, v2.21.0
  • Marker angle/direction properties - v2.15.0
  • Y-axis shift/autoshift for multi-axis plots - v2.17.0
  • Scattermapbox clustering - v2.16.0
  • Equal Earth projection for geo plots - v2.25.0
  • Pattern support for pie, sunburst, treemap, etc. - v2.24.0

cpsievert and others added 30 commits January 19, 2026 16:20
Key changes in v2.12.0:
- Added `griddash` axis property for multiple plot types
- Added minor tick and grid line styling options
- Performance improvement with "willReadFrequently" 2D context
- Fixed blank tick labels on cartesian axes

Also modified update_plotlyjs.R to support specific version targeting.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Bug fixes:
- Fixed disabling polar rotation when dragmode is false
- Fixed custom modebar buttons mutating input
- Corrected schema description spacing

Also added .venv/ to .gitignore.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
New features:
- Persistent and editable selections over cartesian subplots
- New parallel coordinates options (unselected line color/opacity)
- Enhanced violin trace with additional quartile algorithms
- More flexible automargin control on cartesian axes
- Added delta.prefix and delta.suffix to indicator traces
- Added Chinese (Taiwan) and Sinhala locales

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Bug fix:
- Fixed regression where selections were improperly attached to undefined event data

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Bug fixes:
- Fixed sankey select error introduced in v2.13.0
- Fixed handling of missing drag layer for invisible sankey traces
- Fixed selection event emission in shape drawing dragmodes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Bug fix:
- Emit plotly_selected event on plot API calls and GUI edits

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
New features:
- Added support for sankey links with arrows
- Added editSelection option to config
- Updated Dutch translations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
New features:
- New marker properties: angle, angleref, standoff
- Legend control: entrywidth and entrywidthmode
- Layout: minreducedwidth and minreducedheight for automargin control
- Updated pie chart rotation to use angle value type

Bug fixes:
- Fixed automargin axis title updates
- Fixed pattern and slice export issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Fix:
- Fixed npm module issue

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
New features:
- Clustering options for scattermapbox
- Bounds support for mapbox subplots

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Bug fix:
- Fixed choroplethmapbox selection when adding new traces

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Bug fix:
- Fixed regression in mapbox clearOutline from v2.13.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Bug fix:
- Fixed hover on multicategory axes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Bug fix:
- Fixed regression with scattermapbox redraw from v2.16.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Bug fix:
- Disabled slider interactions when staticPlot is true

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
New features:
- Added y-axes shift and autoshift to avoid axis overlapping
- Added group attributes for scatter trace: alignmentgroup, offsetgroup
- Added marker.cornerradius for treemap trace

Changes:
- Switched bundler from browserify to webpack

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Bug fix:
- Fixed line redraw regression from v2.15.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
New features:
- Added new sync tickmode option
- Improved mobile & tablet device detection for WebGL rendering

Bug fix:
- Fixed requirejs AMD loader import name issue (regression from v2.17.0)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Changes:
- Upgraded d3-interpolate and d3-color to v3

Bug fixes:
- Fixed SVG export scaling by removing vector-effect CSS for static plots
- Fixed hover on IE (regression from v2.5.0)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Bug fixes:
- Prevented attaching internal d3 object to window (regression from v2.17.0)
- Fixed lower/upper fence order in French locale
- Fixed formats in Peruvian Spanish (es-pe) locale

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
New features:
- Added shape label attribute
- Added labelalias for various axes types

Bug fix:
- Fixed hover label overlap for hovermode: 'x'|'y'

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Bug fix:
- Ensure slider range stays in bounds during drag

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
New feature:
- Added title.automargin for automatic top/bottom margining

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
New features:
- Added label.texttemplate for parametric shapes
- Added strict option for custom bundle command

Bug fixes:
- Fixed legend dragging with non-default anchors
- Fixed heatmap zsmooth: "fast" rendering/performance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
New features:
- Multiple legend support with legend2, legend3, etc.
- Added visible option for legends

Bug fixes:
- Fixed plotly_click on touch devices for gl3d scenes
- Fixed scatter3d when marker.opacity is zero
- Fixed scattermapbox visibility restyle
- Updated Norwegian and Slovak translations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
New features:
- Added legend.xref and legend.yref for container-referenced positioning
- Added colorbar.xref and colorbar.yref for container-referenced positioning

Performance:
- Improved heatmap rendering performance when zsmooth is false

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Bug fix:
- Fixed heatmap rendering on iOS and Safari when zsmooth is false

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Fixed text rendering while drawing new shapes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Added pattern support for pie, funnelarea, sunburst, icicle, and treemap charts
- Fixed hover text access when all markers have "hoverinfo: none"
- Fixed margin spacing for container-referenced legends and colorbars

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Fixed minimal copying of arrays in minExtend function (regression from v2.24.0)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
cpsievert and others added 10 commits January 19, 2026 16:20
- Fixed legend groups toggle (regression from v2.22.0)
- Fixed waterfall chart hover template delta display on total values

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Fixed double-click hiding traces in other legends
- Fixed double-click behavior for pie chart slices with multiple legends
- Fixed legend group and trace order defaults with multiple legends

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Added "Equal Earth" projection for geo subplots
- Added options to include legends for shapes and newshape
- Added Plotly.deleteActiveShape command
- Fixed contour plot colorscale domain calculation
- Fixed text markers on non-mapbox styled maps

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Fixed clearing legend using React (regression from v2.25.0)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Updated Croatian translations (hr locale)
- Security fix: addressed potential prototype pollution in plot API calls

This completes the upgrade from v2.11.1 to v2.25.2.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Tracks:
- Potential regressions to test (pie rotation, selection events, SVG export, etc.)
- Potential improvements/new features to expose in R package

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Investigated all 9 potential regressions - none are actual regressions:
- Pie rotation: schema change only, no behavioral change
- Selection events: improvement (more consistent event emission)
- SVG export: bug fix improving export quality
- Multiple legends: additive feature, regression already fixed
- Automargin: additive feature only
- Hover labels: bug fix improving positioning
- Bundle size: actually decreased by ~90KB
- Static plots: bug fix for expected behavior
- Heatmap: bug fixes and performance improvements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Exclude from package build:
- .venv (Python virtual environment)
- CLAUDE.md (project instructions)
- PLOTLYJS_UPGRADE_LOG.md (upgrade tracking)
- PLOTLYJS_UPGRADE_TODO.md (upgrade todos)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Remove PLOTLYJS_UPGRADE_LOG.md and PLOTLYJS_UPGRADE_TODO.md from git
  (kept locally via .gitignore)
- Revert R version requirement to >= 3.2.0 (plotly.js upgrade doesn't
  require newer R)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@cpsievert cpsievert requested a review from Copilot January 19, 2026 23:06

This comment was marked as resolved.

@cpsievert cpsievert marked this pull request as ready for review January 19, 2026 23:07
@cpsievert cpsievert merged commit 0fe3e53 into master Jan 19, 2026
10 checks passed
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.

plotly.js vulnerability

2 participants