plotly/plotly.js
 Watch   
 Star   
 Fork   
1 days ago
plotly.js

v4.0.0

Added

  • Add minscale, maxscale geo plot attributes [#7371], with thanks to @mojoaxel for the contribution!
  • Enable TypeScript compatibility within the library and start exporting types [#7680]
  • Add quiver trace type to visualize vector fields using arrows [#7710, #7945], with thanks to @degzhaus for the contribution!
  • Use dashed markers in legend for shape traces with dash configured [#7845]
  • Add direction attribute to the Sankey trace, controlling the flow direction along the orientation axis [#7870], with thanks to @wf-r for the contribution!
    • forward keeps sources on the left (horizontal) or top (vertical)
    • reversed moves them to the right or bottom
  • Add sort option to Sankey links and nodes [#7873], with thanks to @adamreeve for the contribution!
  • Add support for MathJax v4 [#7898]
  • Add top-level xPixel and yPixel keys to hover and click event data, corresponding to the pixel position of the cursor relative to the top-left corner of the graph div [#7966]
  • When hoveranywhere is enabled, emit a plotly_unhover event when the cursor leaves the plot area [#7966]

Removed

  • Breaking: Remove scattermapbox, choroplethmapbox, densitymapbox trace types, the mapbox subplot, and the mapboxAccessToken config option [#7860]
    • These traces have been deprecated since v3. Use the equivalent *map traces going forward.
  • Breaking: Drop support for MathJax v2 [#7898]
    • MathJax v3 and v4 are now supported in plotly.js
  • Remove config attributes showLink, linkText, sendData, showSources, and showEditInChartStudio, as well as trace attribute stream, since all of these were associated with Chart Studio and are no longer needed [#7812]
  • Remove all *src attributes, as well as layout.hidesources attribute, from the schema [#7829]
  • Remove internal trace._fullInput property and other dead code related to the removed transforms feature. No user-facing changes expected [#7834]

Changed

  • Breaking: Switch color processing library from TinyColor to culori [#7536], #7962]
    • rgb()/rgba() strings with decimal 0–1 fractions are no longer interpreted as percentage values (relative to 255)
    • hsv() color strings are no longer permitted
    • New color formats are now supported: #ff0000aa, #f00a, rgb(255 0 0), rgba(255 0 0 / 0.5), hsl(0 100% 50% / 0.5), hsla(0, 100%, 50%, 0.5), lab(), lch(), oklab(), oklch(), color(), hsl(0.5turn 60% 40%), hsl(none 60% 40%)
    • rgb() now accepts an optional alpha, so rgb(255, 0, 0, 0.5) is no longer opaque (rgb and rgba are aliases per spec)
    • Color strings that are not valid CSS are now rejected, such as hsl(120, 50% 50%)
    • Contrasting text and border colors are picked by WCAG contrast ratio, so labels on saturated mid-tone fills may switch from dark to white
  • Breaking: Set default layout.axis.tickmode to 'sync' when axis is overlaying [#7684]
  • Breaking: Change splom.axis.matches default from false to true [#7843]
  • Breaking: Replace country-regex with country-iso-search to search for country names in choropleth, scattergeo traces [#7856]
    • The vast majority of country names are handled exactly the same with the new library; a small number of legacy entries have been removed
  • Breaking: Update minimum required Node version to 22 [#7861]
  • Breaking: Change layout.geo.fitbounds default from false to 'locations' [#7895]
    • geo subplots will now auto-fit the initial view to the trace data
    • Set fitbounds: false explicitly to opt out
  • Breaking: Return actual data values (rather than calcdata values) for xvals / yvals in hoveranywhere and clickanywhere events. Date and category axes will now return strings rather than numeric values. Linear and log axis values remain unchanged. [#7964]
  • Enable scattermap icons to render in color, upgrade Maki icons version to 8.2, and standardize scattermap legend icons to circles [#7825]
  • Use plot title as default filename for "Download plot" button [#7828]
  • Change signature of plots.graphJson() function to remove mode argument [#7829]
  • Upgrade plotly/d3-sankey to 0.12.3. [#7830], with thanks to @adamreeve for the contribution!
  • Update plot_config to show the "Upload to Cloud" button by default, and set the default server URL to cloud.plotly.com via [#7909]
  • Update "Share chart" dialog with more informative wording [#7928]

Fixed

  • Fix histogram autobin size for single-point traces in overlay mode on data updates via Plotly.react [#7507], with thanks to @Lexachoc for the contribution!
  • Format tick labels correctly for small numbers in exponential notation [#7768], with thanks to @Hasnaathussain for the contribution!
  • Defer automargin during scroll-wheel zoom, to prevent erratic jittering while zooming [#7815], with thanks to @keilogic for the contribution!
  • Fix crash when ordering categories by value (e.g. sum descending) with null coordinates [#7855]
  • Prevent outside bar text for zero-length bars from overlapping axis tick labels [#7872], with thanks to @vizansh for the contribution!
  • Fix scattermap, densitymap traces not showing all points by dynamically computing center, zoom values [#7884, #7913], with thanks to @palmerusaf and @DhruvGarg111 for the contributions!
  • Fix GeoJSON bounding-box computation for choropleth and scattergeo traces whose geometry crosses the antimeridian [#7891]
  • Fix hovertemplate/texttemplate/tickformat/hoverformat improperly handling d3-format specs that start with a sign flag such as +.2f [#7900], with thanks to @TemRevil for the contribution!
  • Snap cartesian axis tick values to multiple of delta so custom tickformat (e.g. "~r") no longer shows floating-point artifacts [#7901], with thanks to @arieleli01212 and @kirthi-b for the contribution!
  • Fix scattermap box and lasso selection across the antimeridian [#7905], with thanks to @coyaSONG for the contribution!
  • Fix crash ("Something went wrong with axis scaling") when a colorbar's title or padding leaves it with a negative domain length [#7908], with thanks to @zeehio for the contribution!
  • Prevent MultiPolygon features with no positive-area polygon from aborting choropleth rendering [#7921], with thanks to @swjturay for the contribution!
  • Fix geo.fitbounds: 'locations' when mixing antimeridian-crossing territories with normal ones [#7948]
  • Fix issue where plot fails to render if unsupported MathJax version is present on page [#7951]
  • Fix numeric color sorting for bundled parallel-categories (parcats) paths [#7959], with thanks to @CAOShurong for the contribution!
2026-07-22 01:07:26
plotly.js

v4.0.0-rc.0

Added

  • Add minscale, maxscale geo plot attributes [#7371], with thanks to @mojoaxel for the contribution!
  • Enable TypeScript compatibility within the library and start exporting types [#7680]
  • Add quiver trace type to visualize vector fields using arrows [#7710], with thanks to @degzhaus for the contribution!
  • Use dashed markers in legend for shape traces with dash configured [#7845]
  • Add sort option to Sankey links and nodes [#7873], with thanks to @adamreeve for the contribution!
  • Add support for MathJax v4 [#7898]

Removed

  • Breaking: Remove scattermapbox, choroplethmapbox, densitymapbox trace types, the mapbox subplot, and the mapboxAccessToken config option [#7860]
    • These traces have been deprecated since v3. Use the equivalent *map traces going forward.
  • Breaking: Drop support for MathJax v2 [#7898]
    • MathJax v3 and v4 are now supported in plotly.js
  • Remove config attributes showLink, linkText, sendData, showSources, and showEditInChartStudio, as well as trace attribute stream, since all of these were associated with Chart Studio and are no longer needed [#7812]
  • Remove all *src attributes, as well as layout.hidesources attribute, from the schema [#7829]
  • Remove internal trace._fullInput property and other dead code related to the removed transforms feature. No user-facing changes expected [#7834]

Changed

  • Breaking: Switch color processing library from TinyColor to color [#7536]
    • rgb()/rgba() strings with decimal 0–1 fractions are no longer supported
    • hsv() color strings are no longer permitted
    • Color calculations may differ slightly (by a few RGB units)
    • New color formats are now supported: '#ff0000aa', '#f00a', 'rgb(255 0 0)', 'rgba(255 0 0 / 0.5)', 'hsl(0 100% 50% / 0.5)', 'hsla(0, 100%, 50%, 0.5)', 'hwb(0, 0%, 0%)'
  • Breaking: Set default layout.axis.tickmode to 'sync' when axis is overlaying [#7684]
  • Breaking: Change splom.axis.matches default from false to true [#7843]
  • Breaking: Replace country-regex with country-iso-search to search for country names in choropleth, scattergeo traces [#7856]
    • The vast majority of country names are handled exactly the same with the new library; a small number of legacy entries have been removed
  • Breaking: Update minimum required Node version to 22 [#7861]
  • Breaking: Change layout.geo.fitbounds default from false to 'locations' [#7895]
    • geo subplots will now auto-fit the initial view to the trace data
    • Set fitbounds: false explicitly to opt out
  • Enable scattermap icons to render in color, upgrade Maki icons version to 8.2, and standardize scattermap legend icons to circles [#7825]
  • Use plot title as default filename for "Download plot" button [#7828]
  • Change signature of plots.graphJson() function to remove mode argument [#7829]
  • Upgrade plotly/d3-sankey to 0.12.3. [#7830], with thanks to @adamreeve for the contribution!
  • Update plot_config to show the "Upload to Cloud" button by default, and set the default server URL to cloud.plotly.com via [#7909]

Fixed

  • Fix histogram autobin size for single-point traces in overlay mode on data updates via Plotly.react [#7507], with thanks to @Lexachoc for the contribution!
  • Format tick labels correctly for small numbers in exponential notation [#7768], with thanks to @Hasnaathussain for the contribution!
  • Fix crash when ordering categories by value (e.g. sum descending) with null coordinates [#7855]
  • Fix scattermap, densitymap traces not showing all points by dynamically computing center, zoom values [#7884, #7913], with thanks to @palmerusaf and @DhruvGarg111 for the contributions!
  • Fix GeoJSON bounding-box computation for choropleth and scattergeo traces whose geometry crosses the antimeridian [#7891]
  • Snap cartesian axis tick values to multiple of delta so custom tickformat (e.g. "~r") no longer shows floating-point artifacts [#7901], with thanks to @arieleli01212 and @kirthi-b for the contribution!
2026-07-03 05:42:04
plotly.js

v3.7.0

Changed

  • Update sendDataToCloud modebar button to upload chart to Plotly Cloud [#7802, #7852, #7854]
    • NOTE: The Plotly Cloud endpoint for receiving charts is not yet functional, so this button won't complete the upload.

Fixed

  • Fix stale scattergl error bars after toggling traces with mixed error bar visibility [#7773], with thanks to @JulienIcon for the contribution!
  • Fix "unrecognized GUI edit: selections[0]..." warnings emitted after making a box or lasso selection and then calling Plotly.react() [#7836]
  • Fix geo fitbounds to choose a compact longitude range when point data straddles the antimeridian [#7837], with thanks to @SharadhNaidu for the contribution!
  • Preserve XML structural entities during decode when exporting SVG [#7838]
  • Fix Plotly.Fx.hover crash on scattermap traces when called programmatically with a pointNumber selection [#7882]
2026-06-01 22:48:47
plotly.js

v3.6.0

Added

  • Add support for arrays for the pie property legendrank, so that it can be configured per slice [#7723], with thanks to @my-tien for the contribution!
  • Add hoversort layout attribute to sort unified hover label items by value [#7734], with thanks to @kimsehwan96 for the contribution!

Fixed

  • Fix unexpected ticklabelindex behavior when minor ticks are not shown [#7735], with thanks to @my-tien for the contribution!
  • Fix issue where hoveranywhere / clickanywhere would not emit hover and click events over editable shapes [#7788]
  • Handle 'pixel' size mode for shape labels [#7790]
  • Update box plot defaults to fix issue with calling Plotly.react to switch from box to violin plot [#7811]
  • Include shapes with legendgroup specified when handling legend visibility toggling [#7813]

Full Changelog: https://github.com/plotly/plotly.js/compare/v3.5.1...v3.6.0

2026-05-02 02:53:30
plotly.js

v3.5.1

Changed

  • Reduce NPM bundle size by removing unneeded files [#7746]

Fixed

  • Fix bug where certain axis.minallowed values could cause axis to be reversed [#7761]

Full Changelog: https://github.com/plotly/plotly.js/compare/v3.5.0...v3.5.1

2026-04-03 21:53:43
plotly.js

v3.5.0

Added

  • Add hoveranywhere and clickanywhere layout attributes to enable emitting hover and click events anywhere in the plot area, not just over traces [#7707]
  • Add displayNotifier configuration property to set the display of notifier in the top right area of the viewport [#7730], with thanks to @silversonicaxel for the contribution!
  • Update USA location lookup for scattergeo and choropleth traces to use both location names and abbreviations [7731]
2026-02-21 04:44:14
plotly.js

v3.4.0

Added

  • Add support for clicking legend titles to toggle visibility of all traces in legend [#7698]
  • Add support for shapes to reference multiple axes [#7666]
  • Add support for dashed marker lines in scatter plots [#7673], with thanks to @chrimaho for the contribution!

Changed

  • Increase axis autorange when bar charts have outside text labels, to avoid labels being clipped [#7675]

Fixed

  • Fix issue where some traces in stacked area charts were not rendering their fill correctly after certain sequences of hide/show operations in the legend [#7668]
  • Fix out of bounds index during scattergl animation trace type [#7676], with thanks to @BJohnBraddock for the contribution!
2025-12-12 06:04:52
plotly.js

v3.3.1

Added

  • Add support for arrays for the pie properties showlegend and legend, so that these can be configured per slice. [#7580], with thanks to @my-tien for the contribution!

Changed

  • Replace deprecated String.substr() with String.slice() [#7662], with thanks to @JBR-0100 for the contribution!

Full Changelog: https://github.com/plotly/plotly.js/compare/v3.3.0...v3.3.1

2025-11-15 05:20:44
plotly.js

v3.3.0

Added

  • Add hovertemplate for candlestick and ohlc traces [#7619]
  • Generate list of ISO codes for provided topojson maps, update info for some disputed territories [#7622]

Changed

  • Turn off borders for plot container in CSS reset [#7617]

Fixed

  • Fix KDE sampling precision in violin trace to eliminate floating-point drift and prevent density underrun/overrun [#7581], with thanks to @Koookadooo for the contribution!
2025-10-31 03:52:00
plotly.js

v3.2.0

Added

  • Add hovertemplatefallback and texttemplatefallback attributes [#7577]

Fixed

  • Fix wrong scrolling behavior for legend [#7067], with thanks to @Lexachoc for the contribution!
  • Fix bug affecting use of customdata with typed arrays [#7608]

Full Changelog: https://github.com/plotly/plotly.js/compare/v3.1.2...v3.2.0