github plotly/plotly.js v2.0.0

latest releases: v3.0.0-rc.0, v2.35.2, v2.35.1...
3 years ago

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, and mapbox
    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 strict partial bundle [#5413, #5444], which includes
    the maximal subset of the library which does not rely on function constructors
  • Add custom-bundle script to facilitate generation of custom bundles [#5527, #5508, #5605, #5712]
  • Add mock validation utility [#5653]
  • Implement "fast" zsmooth option for image trace [#5354, #5386],
    with thanks to @almarklein for the contribution!
  • Implement various marker.pattern options in histogram, bar and barpolar traces [#5520, #5537]
    with thanks to @s417-lama for the contribution!
  • Implement ticklabeloverflow options on cartesian axes and colorbars to drop tick labels going outside div or domain [#5584]
  • Implement (x|y|z)hoverformat, (u|v|w)hoverformat and valueformat to cartesian and gl3d traces [#5563]
  • Implement "(x|y)other" hovertemplate options 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.add and modebar.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 to fullLayout [#5409]
  • Stop injecting MathJax config by default [#5514]
  • Remove sane-topojson and 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.Fx and Plotly.Plots in the API [#5420]
  • Drop Plotly.plot from the API [#5412, #5370, #5393]
  • Drop Plotly.Queue from the API [#5423]
  • Drop non-object role keys from attribute definition [#5425, #5432]
  • Drop deprecated contourgl and area traces as well as deprecated legacy
    pre-scatterpolar polar-related attributes bar.t, bar.r,
    scatter.t, scatter.r, layout.radialaxis, layout.angularaxis and
    gd.framework [#5399, #5408, #5409, #5398, #5438]
  • Stop overwriting the "latest" bundles on CDN, please specify the version [#5462, #5697]

Deprecated

  • Deprecate heatmapgl and pointcloud trace types for later removal [#5447]
  • Deprecate transform attributes [#5657]

Changed

  • No longer show "Aa" text in legends unless there is only text in the legend item [#5682]
  • New defaults for legend.title.font and colorbar.title.font to depend on legend.font and colorbar.tickfont and increase their sizes [#5611]
  • New defaults for spikes by setting spikedistance to "-1" and axis.spikesnap to "hovered data" [#5648]
  • Default hovermode to "closest" [#5647]
  • Default textposition to "auto" in bar, histogram and waterfall traces [#5638]
  • Hide hover and spike modebar buttons by default while layout.modebar.add or config.modeBarButtonsToAdd could be used to bring them back in [#5654, #5658]
  • Switch to native-promise-only module to handle es6 promises [#5358]
  • Switch to probe-image-size module 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_bgcolor for better dark mode display of
    sankey, parcoords and parcats traces [#5506]
  • Improve sankey text namely support pseudo-html, fix textfont.color and avoid clipping [#5531]
  • Make selection event data of scattergl on par with scatter traces [#5534]
  • Fire plotly_unhover event when dragging [#5407],
    with thanks to @rreusser for the contribution!
  • Include transforms and calendars in partial bundles [#5379, #5422]
  • Require unminified mapbox-gl dependency 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" fill for scattergl traces 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 scattergl performance 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 bar inside text font color default when using colorscale [#5666]
  • Fix texttemplate on log axes [#5622]
  • Fix displaying zero threshold for indicator trace [#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.ensureNumber function [#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]

Don't miss a new plotly.js release

NewReleases is sending notifications on new releases.