v2.0.0
Please see our full release announcement on the Plotly Community Forum: https://community.plotly.com/t/announcing-plotly-js-2-0/53675
Our commitment to semantic versioning requires us to make this next release a major version bump because we are making some backwards-incompatible changes to older and deprecated features (see below), but we see this as a low-risk maintenance release and we expect that the vast majority of users should plan to upgrade without fearing significant issues, including Javascript developers who embed Plotly.js directly in their apps or websites, as well as data scientists using Plotly.js via Plotly.py in a notebook environment, and of course Dash app developers!
Added
- CSP safety: refactored to avoid usage of function constructors from
basic,cartesian,finance,geo, andmapbox
partial bundles and added tests to ensure that they will not again do so in the future [#5359, #5383, #5387],
with thanks to Equinor for sponsoring the related development! - Add
strictpartial bundle [#5413, #5444], which includes
the maximal subset of the library which does not rely on function constructors - Add
custom-bundlescript to facilitate generation of custom bundles [#5527, #5508, #5605, #5712] - Add mock validation utility [#5653]
- Implement "fast"
zsmoothoption forimagetrace [#5354, #5386],
with thanks to @almarklein for the contribution! - Implement various
marker.patternoptions inhistogram,barandbarpolartraces [#5520, #5537]
with thanks to @s417-lama for the contribution! - Implement
ticklabeloverflowoptions on cartesian axes and colorbars to drop tick labels going outside div or domain [#5584] - Implement
(x|y|z)hoverformat,(u|v|w)hoverformatandvalueformatto cartesian and gl3d traces [#5563] - Implement "(x|y)other"
hovertemplateoptions to format differing positions in compare and unified modes [#5690] - Add layout and template attributes to facilitate enabling and disabling predefined modebar buttons e.g. shape drawing and "v1hovermode" via
modebar.addandmodebar.remove[#5660]
Removed
- Drop support for old browsers IE9 and IE10 [#5376, #5380, #5460, #5491]
- Stop exporting v3 of d3 under
Plotly.d3[#5400, #5406] - Stop attaching
_has*plot types tofullLayout[#5409] - Stop injecting MathJax config by default [#5514]
- Remove
sane-topojsonand MathJax v2.3 files from dist folder and change supported MathJax version to v2.7.5 [#5487, #5492, #5494] - Reduce the number of exported methods from
Plotly.FxandPlotly.Plotsin the API [#5420] - Drop
Plotly.plotfrom the API [#5412, #5370, #5393] - Drop
Plotly.Queuefrom the API [#5423] - Drop non-object
rolekeys from attribute definition [#5425, #5432] - Drop deprecated
contourglandareatraces as well as deprecated legacy
pre-scatterpolarpolar-related attributesbar.t,bar.r,
scatter.t,scatter.r,layout.radialaxis,layout.angularaxisand
gd.framework[#5399, #5408, #5409, #5398, #5438] - Stop overwriting the "latest" bundles on CDN, please specify the version [#5462, #5697]
Deprecated
- Deprecate
heatmapglandpointcloudtrace types for later removal [#5447] - Deprecate
transformattributes [#5657]
Changed
- No longer show "Aa" text in legends unless there is only text in the legend item [#5682]
- New defaults for
legend.title.fontandcolorbar.title.fontto depend onlegend.fontandcolorbar.tickfontand increase their sizes [#5611] - New defaults for spikes by setting
spikedistanceto "-1" andaxis.spikesnapto "hovered data" [#5648] - Default
hovermodeto "closest" [#5647] - Default
textpositionto "auto" inbar,histogramandwaterfalltraces [#5638] - Hide hover and spike modebar buttons by default while
layout.modebar.addorconfig.modeBarButtonsToAddcould be used to bring them back in [#5654, #5658] - Switch to
native-promise-onlymodule to handle es6 promises [#5358] - Switch to
probe-image-sizemodule to get width and height of images [#5388, #5635] - Relax test for plain objects to enable validation in node.js and multiple window contexts [#5411, #5498]
- Display latitudes before longitudes in mapbox and geo hoverlabels to comply with ISO 6709 (Standard representation of geographic point location by coordinates) [#5485, #5676]
- Adjust text shadow color in respect to
paper_bgcolorfor better dark mode display of
sankey,parcoordsandparcatstraces [#5506] - Improve
sankeytext namely support pseudo-html, fixtextfont.colorand avoid clipping [#5531] - Make selection event data of
scatterglon par withscattertraces [#5534] - Fire
plotly_unhoverevent when dragging [#5407],
with thanks to @rreusser for the contribution! - Include transforms and calendars in partial bundles [#5379, #5422]
- Require unminified
mapbox-gldependency for unminified bundles and
revisit compression options for minified bundles [#5449] - Remove header comments from the source files and only add headers to the top of
dist files at build time [#5436, #5446] - Guard against unexpected characters at build time [#5424]
- Minimize indentation in plot-schema [#5663]
- More maintenance work listed under the the 60th milestone!
Fixed
- Fix "toself"
fillforscattergltraces to handle multiple polygons [#5355],
with thanks to @ruijin for the contribution! - Fix element targeting on hover in shadow DOM [#5256],
with thanks to @dbluhm for the contribution! - Fix hover interaction on geo subplots in Firefox [#5607],
with thanks to @LucaVazz for the contribution! - Improve
scatterglperformance when using typed arrays [#5632],
with thanks to @Seranicio for the contribution! - Fix native ES6 import [#5708],
with thanks to @oldrich-svec suggestion! - Hide gridlines and ticks overlapping "inside" ticklabels [#5550, #5586, #5589, #5610, #5684]
- Improve hover in compare and unified modes [#5543, #5618, #5662, #5664, #5668, #5683]
- Fix spike on
bar-like traces [#5542] - Fix
barinside text font color default when using colorscale [#5666] - Fix
texttemplateon log axes [#5622] - Fix displaying zero
thresholdforindicatortrace [#5430] - Fix axis constraints for
heatmapgl[#5476] - Fix setTimeout functions to return in the case of undefined layouts [#5482]
- Fix misinterpreted clip-path by some programs after export [#5686]
- Avoid redundant number casting in
Lib.ensureNumberfunction [#5637] - Avoid duplicate keys in object literals within plotly builds [#5458]
- Revise attributions of Carto, Stamen and Open Street Map styles [#5696]
- Improve attribute compression and avoid redundant copyright comments in non-minified
bundles [#5426, #5429, #5439] - Provide links to all pull requests in the changelog [#5469]
- Provide documention for creating custom bundles and improve readme files [#5702, #5703, #5704, #5705, #5713]
- Provide a link to plotly.js dependencies when publishing various plotly.js-dist packages to npm [#5711]
- Adjust npm publish script to use relevant tag e.g. "rc" when publishing various plotly.js-dist packages [#5467]
- Place CDN publish script inside plotly.js repository [#5468, #5470]
- Fix syntax test on the dist files [#5471]