All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
dcc.Input
component now handlesdisabled=False
property.- Broken sourcemaps for debugging.
- Testing configuration for CHROMEPATH and SERVER_PROCESSES
- Various bugs with the
ohlc
andcandlestick
chart type in thedcc.Graph
component were fixed. See plotly#184.
- Previously, if a user named their app file
dash.py
, an unhelpful error message would be raised. Now,import dash_core_components
will check if the user has a file nameddash.py
and warn the users appropriately. plotly#177
- In some cases, frequently multi-page apps, the
dcc.Graph
interactive properties will stop working (selectedData
,hoverData
,relayoutData
). This should be fixed now. plotly#178 dcc.Graph
will now resize after it it plotted for the first time. This should fix issues where thedcc.Graph
component was not fitting to the size of its container. plotly#178
-
Upgraded Plotly.js, the underlying library behind the
dash_core_components.Graph
component, to version 1.35.2. See https://github.com/plotly/plotly.js/releases/tag/v1.35.2 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
- Add
automargin
attribute to cartesian axes which auto-expands margins when ticks, tick labels and/or axis titles do not fit on the graph #2243 - Add support for typed arrays as data array inputs #2388
- Add layout
grids
attribute for easy subplot generation #2399 - Implement
cliponaxis: false
for bar text #2378 - Add opposite axis attributes for range slider to control y axis range behavior #2364
- Generalize
hoverdistance
andspikedistance
for area-like objects #2379 - Bring
scattergl
auto-range logic to par with SVGscatter
#2404 - Add selected/unselected marker color size support to
scattermapbox
traces #2361
- Add
As part of the Plotly.js upgrade:
- Bump
mapbox-gl
tov0.44.0
#2361 - Bump
glslify
tov6.1.1
#2377 - Stop relinking
customdata
,ids
and any matching objects ingd._fullLayout
duringPlots.supplyDefaults
#2375
As part of the plotly.js upgrade:
- Fix buggy auto-range / auto-margin interaction leading to axis range inconsistencies on redraws (this bug was mostly noticeable on graphs with legends) #2437
- Bring back
scattergl
lines under select/lassodragmode
(bug introduced in1.33.0
) #2377 - Fix
scattergl
visible toggling for graphs with multiple traces with different modes (bug introduced in1.33.0
) #2442 - Bring back
spikelines
for traces other thanscatter
(bug introduced in1.33.0
) #2379 - Fix
Plotly.Fx.hover
acting on multiple subplots (bug introduced in1.32.0
) #2379 - Fix range slider with stacked y axes positioning
(bug introduced in
1.32.0
) #2451 - Fix
scattergl
color clustering #2377 - Fix
Plotly.restyle
forscattergl
fill
#2377 - Fix multi-line y-axis label positioning #2424
- Fix centered hover labels edge cases #2440, #2445
- Fix hover labels in bar groups in compare mode #2414
- Fix axes and axis lines removal #2416
- Fix auto-sizing in
Plotly.react
#2437 - Fix error bars for
Plotly.react
and uneven data arrays #2360 - Fix edits for date-string referenced annotations #2368
- Fix
z
hover labels with exponents #2422 - Fix yet another histogram edge case #2413
- Fix fall back for contour labels when there's only one contour #2411
- Fix
scatterpolar
category angular period calculations #2449 - Clear select outlines on mapbox zoomstart #2361
- Fix legend click to causes legend scroll bug #2426
- The
selectedData
,clickData
, andhoverData
callbacks were being attached without being removed every time the graph was updated. They are now removed and reattached. #172
- The
serve_locally
was broken - the Plotly.js bundle wasn't being served correctly.
-
Upgraded Plotly.js, the underlying library behind the
dash_core_components.Graph
component, to version 1.34.0. See https://github.com/plotly/plotly.js/releases/tag/v1.34.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
- Add constraint-type contours to
contour
traces [plotly/plotly.js#2270] - Add
notched
andnotchwidth
attributes tobox
traces [plotly/plotly.js#2305] - Add localization machinery to auto-formatted date axis ticks [plotly/plotly.js#2261]
- Add support for
text
inmesh3d
traces [plotly/plotly.js#2327] - Add support for scalar
text
insurface
traces [plotly/plotly.js#2327] - Make mode bar for graphs with multiple subplot types more usable [plotly/plotly.js#2339]
- Add constraint-type contours to
- The
Graph
component now usesPlotly.react
instead ofPlotly.newPlot
. This should fix issues when repeatedly updating GL chart types (surface
,scatter3d
,scattergl
). #170- Many other bug fixes from the PLotly.js upgrade, including:
- Prevent page scroll on mobile device on
gl2d
andgl3d
subplots [plotly/plotly.js#2296] - Fix multi-marker
scattergl
selection errors (bug introduced in1.33.0
) [plotly/plotly.js#2295] - Fix trace
opacity
restyle forscattergl
traces (bug introduced in1.33.0
) [plotly/plotly.js#2299] - Fix
scattergl
handling ofselectedpoints
across multiple traces [plotly/plotly.js#2311] - Fix
scattergl
horizontal and vertical line rendering [plotly/plotly.js#2340] - Fix
table
when content-less cells and headers are supplied [plotly/plotly.js#2314] - Fix
hoverformat
onvisible: false
cartesian axes (bug introduced in1.33.0
) [plotly/plotly.js#2329] - Fix handling of double negative translate transform values [plotly/plotly.js#2339]
- Fix compare
hovermode
fallback for non-cartesian subplot types [plotly/plotly.js#2339]
PropTypes
now usesprop-types
package instead ofReact
to support move to React 16+
- 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.