All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
- Upgraded Plotly.js, the underlying library behind the
dash_core_components.Graph
component, to version 1.33.1. Fixes include- Fix selection on scattergl plots with >20k points #2266
- Update Spanish localization with new strings #2268
- Fix test_dashboard overly rigid restriction so parcoods works there #2273
- Make layout.colorway compatible with sankey traces #2277
- Fix click events on fixedrange subplots #2279
- Remove ghost fill when trace data is emptied out #2280
- Fix resizing of new scattergl plots #2283
- Fix positioning of carpet axis titles for cheaterslope edge cases #2285
- Fix coloring and hover info for heatmaps and contour maps with nonuniform bins #2288
-
Upgraded Plotly.js, the underlying library behind the
dash_core_components.Graph
component, to version 1.33.0. This was a huge release! Here are some of the new features that are available. See https://github.com/plotly/plotly.js/releases/tag/v1.33.0 for the official notes.Many of these features were funded directly by companies that rely on this library. If your organization or company would like to sponsor particular features or bug fixes in these open source libraries, please reach out: http://plot.ly/products/consulting-and-oem
- Completely rewritten
scattergl
trace type usingregl
plotly.js/pull/2258 - Completely rewritten polar chart renderer accompanied by new
scatterpolar
andscatterpolargl
trace types plotly.js/pull/2200 - Add the ability to draw layout images and layout shapes on subplot
with
scattergl
traces plotly.js/pull/2258 - Add
fill
capabilities toscattergl
traces plotly.js/pull/2258 - Add
spikedistance
,hoverdistance
andskipsnap
for more customizable spikes and hover behavior on cartesian subplots plotly.js/pull/2247 - Add official Spanish translation (locale
es
) plotly.js/pull/2249 - Add official French translation (locale
fr
) plotly.js/pull/2252
- Completely rewritten
- With the plotly.js upgrade, the old polar trace types
(
scatter
with(r, t)
coordinates, bar with ((r, t)
coordinates andarea
) are now deprecated).
- Several bugs with the
dcc.Graph
component were fixed with the plotly.js upgrade. These include:- Fix
gl2d
tick label on pan interaction regression plotly.js/pull/2258 - Fix
candlestick
hover label regression (bug introduced in v1.32.0) plotly.js/pull/2264 - Fix several
gl2d
axis related bugs with new regl-basedscattergl
plotly.js/pull/2258 See full list under the On-par gl2d milestone https://github.com/plotly/plotly.js/milestone/3 - Fix several polar bugs with
scatterpolar
[plotly.js/pull/2200].(plotly/plotly.js#2200) See full list under the On-par polar milestone https://github.com/plotly/plotly.js/milestone/2 - Fix
scattergl
marker.colorscale handling plotly.js/pull/2258 - Fix decimal and thousands settings in
de
locale plotly.js/pull/2246 - Make scroll handler passive, removing those annoying console warnings plotly.js/pull/2251
- Fix
- Previously, if
None
is supplied toSyntaxHighlighter
orMarkdown
, the component would not render and the app would break. This is problematic because ifchildren
isn't supplied (as done in the case for when you are updating that property from a callback),None
is the default property. Fixes plotly#147. This bug was introduced in v0.15.4.
- The
dcc.Graph
component now includespointNumbers
insideselectedData
andhoverData
if the chart type is ahistogram
,histogram2d
, orhistogram2dcontour
.
- Upgraded Plotly.js, the underlying library behind the
dash_core_components.Graph
component, to version 1.32.0. This was a huge release! Here are some of the new features that are available. See https://github.com/plotly/plotly.js/releases/tag/v1.32.0 for the official notes. - Add localization machinery [plotly/plotly.js#2195, plotly/plotly.js#2207, plotly/plotly.js#2210, plotly/plotly.js#2232],
including an official German translation (locale
de
) [plotly/plotly.js#2217] - Add
violin
trace type [plotly/plotly.js#2116] - Add
selected
andunselected
attribute containers to customize selection states [plotly/plotly.js#2135] - Add support for multi-selections [plotly/plotly.js#2140]
- Add layout
colorway
to custom the trace-to-trace color sequence [plotly/plotly.js#2156] - Add
tickformatstops
to set tick format per cartesian axis range [plotly/plotly.js#1965] - Add hover labels and selections to box points [plotly/plotly.js#2094]
- Histogram events & bin hover label improvements [plotly/plotly.js#2113]
- Add support for aggregation in
pie
traces [plotly/plotly.js#2117] - Add annotations
startarrowhead
,arrowside
,startarrowsize
andstartstandoff
attributes [plotly/plotly.js#2164] - Add
zhoverformat
to formatz
values inheatmap
,contour
and 2d histogram traces [plotly/plotly.js#2106, plotly/plotly.js#2127] - Add
marker.opacity
to bar traces [plotly/plotly.js#2163] - Add
Cividis
colorscale [plotly/plotly.js#2178] - Implement transform inverse mapping [plotly/plotly.js#2126, plotly/plotly.js#2162]
- Selections are now persistent [plotly/plotly.js#2135]
- Rename Save and edit plot in cloud mode bar button Edit in Chart Studio [plotly/plotly.js#2183]
Here the bug fixes in the Graph
component brought to you by the plotly.js release.
See https://github.com/plotly/plotly.js/releases/tag/v1.32.0 for the official notes.
- Fix right-click handling [plotly/plotly.js#2241]
- Miscellaneous fixes for
table
traces [plotly/plotly.js#2107, plotly/plotly.js#2182] - Fix horizontal legend items alignment edge case [plotly/plotly.js#2149]
- Fix shape and updatemenu layering [plotly/plotly.js#2121]
- Fix bar with error bar with set
ids
edge case [plotly/plotly.js#2169] - Fix
cliponaxis: false
for non linear cartesian axes [plotly/plotly.js#2177] - Fix heatmap non-uniform brick gaps problem [plotly/plotly.js#2213]
- Fix choropleth selection when
visible: false
trace are present on graph [plotly/plotly.js#2099, plotly/plotly.js#2109] - Fix yet another contour drawing bug [plotly/plotly.js#2091]
- Clean up pie event data [plotly/plotly.js#2117]
- Fix scatter + bar hover edge cases [plotly/plotly.js#2218]
- Allow hover labels to extend to edges of graph area [plotly/plotly.js#2215]
- Harden location-to-feature against non-string country names for geo subplot [plotly/plotly.js#2122]
- Remove obsolete
smith
attribute from plot schema [plotly/plotly.js#2093] - Fix colorbar class name [plotly/plotly.js#2139]
- The
dash_core_components.Location
anddash_core_components.Link
properties should now work on Internet Explorer. Thanks to @nedned for suggesting a solution. Fixes plotly#113
- The
dash_core_components.Location
component now supportshash
,href
, andsearch
in addition to the already supportedpathname
(mimicking thewindow.location
API).href
can be used to handlepathname
,hash
, andsearch
in aggregate, or each can be manipulated independently. - The
children
property ofdash_core_components.Markdown
anddash_core_components.SyntaxHighlighter
now accepts an array of strings (previously it had to be a string). Now, if an array is provided, it is collapsed into a string with line breaks (see #134).
- Upgrade the version of plotly.js from 1.31.0 to 1.31.2. See the list of fixes here: https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md
- The
Interval
component has a new property:n_intervals
. This is an integer that increases every time that the interval passes. This allows you to use theInterval
component without using theevents=[Event(...)]
pattern inside the callback.
This is similar to the n_clicks
property of the dash_html_components
components.
This was the last use case for events=[Event(...)]
inside the
dash_core_components
library. Ultimately, we may be able to deprecate this
pattern.
- The
dash_core_components.Input(type='number')
component actually converts the values to floats or integers, instead of passing the numbers back as strings. plotly#100 Big thanks to community contributor @Madhu94!
- The
disable_click
property in thedcc.Upload
component now works. plotly#106. Big thanks to community contributor @Akronix! - Several properties in several components had the wrong
propTypes
. This has been fixed, improving the documentation for the Dash python classes (and removing warnings in JS development). Big thanks to community contributor @Akronix!
- Attempt to fix the JS builds from 0.15.0 but actually nothing changed.
- Bad build. See 0.15.2 for the correct build
- An
Upload
component! 🎉 See https://plot.ly/dash/dash-core-components/upload for docs.
- Bumped plotly.js from
v1.29.3
tov1.30.0
. This was a huge release by the plotly.js team! 👏 See the full changelog here: https://github.com/plotly/plotly.js/releases/tag/v1.31.0. The following improvements from this version update apply to dash:- Add
table
trace type 2030 - Add
geo.center
making geo views fully reproducible using layout attributes 2030 - Add lasso and select-box drag modes to
scattergeo
andchoropleth
traces 2030 - Add lasso and select-box drag modes to
bar
andhistogram
traces 2045 - Throttle lasso and select-box events for smoother behavior 2040
- Add constraintext attribute for bar traces 1931
- Add axis layer attribute to ternary axes 1952
- Add cross-trace matching auto-binning logic to histogram traces 1944
- Harmonize gl3d and gl2d zoom speed with cartesian behavior 2041
- Fix handling of extreme off-plot data points in scatter lines 2060
- Fix
hoverinfo
array support forscattergeo
,choropleth
,scatterternary
andscattermapbox
traces 2055 - Fix single-bin histogram edge case 2028
- Fix autorange for bar with base zero 2050
- Fix annotations arrow rendering when graph div is off the DOM 2046
- Fix hover for graphs with
scattergeo
markers outside 'usa' scope 2030 - Fix handling of cross anti-meridian geo
lonaxis
ranges 2030 - Fix miter limit for lines on geo subplots 2030
- Fix
marker.opacity
handling forscattergeo
bubbles 2030 - Fix layout animation of secondary axes 1999
- Fix
sankey
hover text placement for emptylink.label
items 2016 - Fix
sankey
rendering of nodes with very small values [2017](https://github.com/plotly/plotly.js/issue/2017,2021] https://github.com/plotly/plotly.js/issue/2021) - Fix
sankey
hover label positioning on pages that style the 'svg-container' div node 2027 - Fix hover label exponents 1932
- Fix scatter fill with isolated endpoints 1933
- Fix parcoords axis tick scale when ticktext is unordered 1945
- Fix sankey with 4 multi-links or more 1934
- Fix exponent labels beyond SI prefixes 1930
- Fix image generation for marker gradient legend items 1928
- Fix parcoords image generation when multiple parcoords graphs are present on page 1947
- Ignore bare closing tags in pseudo-html string inputs 1926
- Add
- Fixed issues related to updating the
max_date_allowed
property ofDatePickerSingle
andDatePickerRange
programmatically through callbacks - Clicking on the end date in the
DatePickerRange
will now open up the calendar to the end date (plotly#80)
- Cleaned up
DatePickerSingle
andDatePickerRange
- Non-ascii characters, like chinese characters, are now supported as
search strings in the
dcc.Dropdown
component (plotly#75)
- The
Interval
component was constantly resetting its interval on every update. Initially reported in https://community.plot.ly/t/multiple-interval-object-in-a-single-page/5699/3 - Removed the used
label
property from theSlider
component - Provide a more descriptive documentation for the
marks
property of theSlider
component
- A
disabled
property on theInterval
component will disable the interval component from firing its updates.
- Added
className
andstyle
properties to the parentdiv
s of theChecklist
,Dropdown
,Graph
andRadioItems
component. As requested in plotly#57, solved in plotly#60
- Previously, the
max_date_allowed
could not be selected. This issue has been fixed, issue first reported in https://community.plot.ly/t/solved-datepicker-in-dash/4816/10
- Previously, when the
options
of adcc.Dropdown
would change, the options would no longer be searchable. That has been fixed. Issue was originally reported in https://community.plot.ly/t/dropdown-not-searching-values-when-typing/5323/3
- Disabled portal settings on
dcc.DatePickerSingle
anddcc.DatePickerRange
whenvertical=True
.with_portal
andwith_full_screen_portal
will only apply ifvertical=False
.
- Added two new date picker components:
dcc.DatePickerSingle
anddcc.DatePickerRange
- Added support for all of the valid HTML attributes of the
Input
component. - Added support for a few more
type
values of theInput
component. The full list of valid types are 'text', 'number', 'password', 'email', 'range', 'search', 'tel', 'url', 'hidden'. Note that type values that don't have cross-browser support are not included (such asdatetime
)
- The
Dropdown
component rendersoptions
much, much faster. It can render 50,000 options (client-side) without crashing! This fixes plotly/dash#103
-
Upgrade plotly.js (the library behind the
Graph
component) from 1.27.0 to 1.29.3. This includes TONS of fixes and improvements, see https://github.com/plotly/plotly.js/releases for more details. Notable improvements include:- Add touch interactions to cartesian, gl2d and ternary subplots including for select and lasso drag modes
- Add support for contour line labels in contour and contourcarpet traces
- Add support for select and lasso drag modes on scattermapbox traces
- Add reset view and toggle hover mode bar buttons to mapbox subplots
- Add support for array marker.opacity settings in scattermapbox traces
- Add namelength layout and trace attribute to control the trace name's visible length in hover labels
- Add cliponaxis attribute to scatter and scatterternary traces to allow markers and text nodes to be displayed above their subplot's axes
- Add axis layer attribute with 'above traces' and 'below traces' values
And fixes include:
- Fix axis line width, length, and positioning for coupled subplots
- Fix alignment of cartesian tick labels
- Fix rendering and updates of overlaying axis lines
- Fix hover for 2D traces with custom colorbar tickvals
- Fix hover and event data for heatmapgl and contourgl traces
- Fix event data for pie and sankey traces
- Fix drag mode 'pan' in IE and Edge
- Fix bar, error bar and box point scaling on scroll zoom
- Fix shading issue in surface trace in iOS
- Fix lasso and select drag modes for
scatterternary
traces - Fix cases of intersecting contour lines on log axes
- Fix animation of annotations, shapes and images
- Fix histogram bin computation when more than 5000 bins are needed
- Fix tick label rendering when more than 1000 labels are present
- A
config
property of theGraph
component that exposes the plotly.js config properties. Here's an example that hides 2 buttons and makes the elements in the graph "editable":
import dash
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash()
app.layout = html.Div([
dcc.Graph(
id='my-graph',
figure={'data': [{'x': [1, 2, 3]}]},
config={'editable': True, 'modeBarButtonsToRemove': ['pan2d', 'lasso2d']}
)
])
if __name__ == '__main__':
app.run_server(debug=True)
- A new
Textarea
component for displaying the simple Textarea HTML element. The content of theTextarea
is controlled through thevalue
property:
dcc.Textarea(id='my-text-area' value='''
SELECT * FROM MY_TABLES
LIMIT 10;
''')
- Clearing a Graph selection box sets the
selectedData
value toNone
(null
in JavaScript). Before, it didn't change theselectedData
property, preventing the user and the Dash developer from clearing selections. Fixes plotly/dash#97, thanks to @pmbaumgartner for reporting.
- The
clearable
property to theDropdown
, which toggles on and off the "x" on the side of the dropdown that clears the current selection. - The
searchable
property to theDropdown
, which toggles on and off whether theDropdown
is searchable.
- Clicking on the little
x
on the side of the Dropdown to clear the currently selected value didn't work. Now it does. Ifmulti=false
, thennull
(or Python'sNone
) is set. Ifmulti=True
, then[]
is set.
- The
Slider
and theRangeSlider
component can update when the user finishes dragging the slider rather than just while they drag. The default behaviour has remained the same (updates while dragging) but you can toggle that the updates only get fired on "mouse up" by settingupdatemode
to'mouseup'
('drag'
is the default). - A
Link
andLocation
were added.Location
represents the address bar of the web browser andLink
provides a way to modify the address bar without refreshing the page. Combined, these two components can be used to create a "single page app" with multiple URLs. That is, apps that have mulitple URLs but surfing between the different pages doesn't trigger a full page refresh like it would with traditional links. - Previously, if callback functions weren't supplied to a component, it wouldn't update. This caused a lot of confusion: users would create a simple layout without any callbacks and then wonder why the sliders wouldn't slide or the text inputs wouldn't update. Now, all of the components manage their own state and their appearance will update regardless of whether Dash has assigned a callback to them.
- A
range
object is now included in theselectedData
object that specifies that dimensions of the selected region. - A
lassoPoints
object is now included in theselectedData
object that provides coordinates of the lassoed region.
- A new property
clear_on_unhover
on theGraph
component will clear thehoverData
property when the user "unhovers" from a point if True. If False, then thehoverData
property will be equal to the data from the last point that was hovered over. The default is False.