Releases: plotly/dash
Dash v2.5.0
Added
- #1947 Added
pages- a better way to build multi-page apps. For more information see the forum post. - #1965 Add component as props.
- #2049 Added
wait_for_class_to_equalandwait_for_contains_classmethods todash.testing
Changed
- #2050 Changed
find_elementandfind_elementsto accept anattributeargument that aligns with Selenium'sByclass, allowing you to search elements by other attributes. Default value isCSS_SELECTORto maintain backwards compatibility with previousfind_elements.
Fixed
- #2043 Fix bug
#2003 in which
dangerously_allow_html=True+mathjax=Trueworks in some cases, and in some cases not. - #2065 Fix bug #2064 rendering of
dcc.Dropdownwith a value but no options. - #2047 Fix bug #1979 in which
DASH_DEBUGas environment variable gets ignored. - #2070 Fix bug #2066 nested types triggering maximum call stack error when building typescript components.
Dash v2.4.1
Fixed
- Fix #2045 import error when using pytest but
dash[testing]is not installed.
Dash v2.4.0
Added
-
#1952 Improved callback_context
- Closes #1818 Closes #1054
- adds
dash.ctx, a more concise name fordash.callback_context - adds
ctx.triggered_prop_ids, a dictionary of the component ids and props that triggered the callback. - adds
ctx.triggered_id, theidof the component that triggered the callback. - adds
ctx.args_grouping, a dict of the inputs used with flexible callback signatures.
-
#2009 Add support for Promises within Client-side callbacks as requested in #1364.
-
#1956 Add TypeScript components generation.
-
#2034 Add
link_targetprop to dcc.Markdown component. Closes #1827 -
#2035 Add type annotations to testing fixtures.
Fixed
-
#2029 Restrict the number of props listed explicitly in generated component constructors - default is 250. This prevents exceeding the Python 3.6 limit of 255 arguments. The omitted props are still in the docstring and can still be provided the same as before, they just won't appear in the signature so autocompletion may be affected.
-
#1968 Fix bug #1877, code which uses
merge_duplicate_headersandstyle_header_conditionalto highlight columns, it incorrectly highlights header cells. -
#2015 Fix bug #1854 in which the combination of row_selectable="single or multi" and filter_action="native" caused the JS error.
-
#1976 Fix #1962 in which DatePickerSingle and DatePickerRange are extremely slow when provided a long list of disabled_days.
-
#2035 Fix #2033 In-App error reporting does not render HTML.
-
#1970 dcc.Dropdown Refactor fixes:
Changed
-
#1751 Rename
app.run_servertoapp.runwhile preservingapp.run_serverfor backwards compatibility. -
#1839 The
callbackdecorator returns the original function, not the wrapped function, so that you can still call these functions directly, for example in tests. Note that in this case there will be no callback context so not all callbacks can be tested this way. -
#2016 Drop the 375px width from default percy_snapshot calls, keep only 1280px
-
#2027 Improve the error message when a user doesn't wrap children in a list
Updated
- #2016, #2032, and #2042 Widespread dependency upgrades
- Upgrade Plotly.js to v2.12.1 (from v2.11.0).
- Upgrade
blackto v22.3.0 for Python 3.7+ - if you usedash[ci]and you callblack, this may alter your code formatting slightly, including more consistently breaking Python 2 compatibility. - Many other mainly JS dependency upgrades to the internals of Dash renderer and components. These may patch bugs or improve performance.
Dash v2.3.1
Dash v2.3.0
Added
- #1949 Add built-in MathJax support to both
dcc.Markdownanddcc.Graph. A new boolean propmathjaxwas added to these two components, defaulting toFalse. Setmathjax=Trueto enable math rendering. This work uses MathJax v3, althoughdcc.Graphand Plotly.js can also be used with MathJax v2.- In
dcc.Markdownthis has two flavors: inline math is any content between single dollar signs, for example"$E=mc^2$", and "display" math (on its own line, potentially multi-line) is delimited by double dollar signs. - In
dcc.Graph, most text fields (graph and axis titles, trace names, scatter and bar text) can use math, and it's enabled with single dollar sign delimiters. A limitation here is that currently a given piece of text can only be one or the other: if math is found, everything outside the delimiters is ignored. See https://plotly.com/python/LaTeX/ for details. - For an intro to LaTeX math, see https://en.wikibooks.org/wiki/LaTeX/Mathematics.
- Big thanks to Equinor for sponsoring this development, including the related work in Plotly.js!
- In
Updated
- #1949 Upgrade Plotly.js to v2.11.0 (from v2.9.0)
- Feature release 2.10.0:
- Support for MathJax v3
fillpatternforscattertraces with filled area
- Feature release 2.11.0:
- Every trace type can now be rendered in a stricter CSP environment, specifically avoiding
unsafe-eval. Please note: theregl-based traces (scattergl,scatterpolargl,parcoords, andsplom) are only strict in thestrictbundle, which is NOT served by default in Dash. To use this bundle with Dash, you must either download it and put it in yourassets/folder, or include it as anexternal_scriptfrom the CDN: https://cdn.plot.ly/plotly-strict-2.11.0.min.js. All other trace types are strict in the normal bundle.
- Every trace type can now be rendered in a stricter CSP environment, specifically avoiding
- Patch release 2.10.1 containing a bugfix for
mesh3dtraces.
- Feature release 2.10.0:
Fixed
-
#1915 Fix bug #1474 when both dcc.Graph and go.Figure have animation, and when the second animation in Figure is executed, the Frames from the first animation are played instead of the second one.
-
#1953 Fix bug #1783 in which a failed hot reloader blocks the UI with alerts.
-
#1942 Fix bug #1663 preventing pie traces from sending
customdatawithclickDataand other events.
Dash v2.2.0
Added
- #1923:
dash.get_relative_pathdash.strip_relative_pathdash.get_asset_url
This is similar todash.callbackwhere you don't need theappobject. It makes it possible to use these
functions in thepagesfolder of a multi-page app without running into the circularappimports issue.
Updated
-
#1911 Upgrade Plotly.js to v2.9.0 (from v2.8.3).
- Adds
ticklabelstepto axes to reduce tick labels while still showing all ticks. - Displays the plotly.js version when hovering on the modebar. This helps debugging situations where there might be multiple sources of plotly.js, for example
/assetsvs the versions built intodccorddk.
- Adds
-
#1930 Upgrade JavaScript dependencies across renderer and all components.
Fixed
Dash v2.1.0
Changed
-
#1876 Delays finalizing
Dash.configattributes not used in the constructor untilinit_app(). -
#1869, #1873 Upgrade Plotly.js to v2.8.3. This includes:
- Feature release 2.5.0:
- 3D traces are now compatible with
no-unsafe-evalCSP rules.
- 3D traces are now compatible with
- Feature release 2.6.0:
- Add
smithsubplots andscattersmithtraces, for drawing Smith charts.
- Add
- Feature release 2.7.0:
- Add text data for
histogramtraces. - Fix an interaction between
uirevisionandautorangethat pops up in some cases of mixed clientside / serverside figure generation.
- Add text data for
- Feature release 2.8.0:
- Add horizontal colorbars.
- Add text data on
heatmapand related trace types. - Control legend group title fonts.
- Patch releases 2.5.1, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.8.1, 2.8.2, and 2.8.3 containing bugfixes.
- This PR also upgrades various other dependencies of dash renderer and component suites.
- Feature release 2.5.0:
-
#1745:
Improve ourextras_require: there are now five options here, each with a well-defined role:dash[dev]: for developing and building dash components.dash[testing]: for using thepytestplugins in thedash.testingmoduledash[diskcache]: required if you useDiskcacheLongCallbackManagerdash[celery]: required if you useCeleryLongCallbackManagerdash[ci]: mainly for internal use, these are additional requirements for the Dash CI tests, exposed for other component libraries to use a matching configuration.
Added
-
#1883 in DataTable added
page_currenttopersisted_propsas requested in #1860 -
Dash and Dash Renderer
Input,State, andOutputnow accept components instead of ID strings and Dashcallbackwill auto-generate the component's ID under-the-hood if not supplied. This allows usage like:
my_input = dcc.Input() my_output = html.Div() app.layout = html.Div([my_input, my_output]) @dash.callback(Output(my_output, 'children'), Input(my_input, 'value')) def update(value): return f'You have entered {value}'
Or, if using Python >=3.8 you can use the
:=walrus operator:app.layout = html.Div([ my_input := dcc.Input(), my_output := html.Div() ]) @dash.callback(Output(my_output, 'children'), Input(my_input, 'value')) def update(value): return f'You have entered {value}'
#1894 restricted this feature so auto-generated IDs are not allowed if the app uses
dash_snapshots(a Dash Enterprise package) or if the component usespersistence, as this can create confusing errors. Callback definitions can still reference components in these cases, but those components must have explicit IDs.Dash Core Components
Rearranged Keyword Arguments & Flexible Types
Dropdown,RadioItem, andChecklist- Rearranged Keyword Arguments -
options&valueare now the first two keywords which means they can be supplied as positional arguments without the keyword. Supplying the keywords (options=andvalue=) is still supported. - Flexible Types -
optionscan be supplied in two new forms:- An array of
string|number|boolwherelabelandvalueare equal to the items in the list. - A dictionary where the keys and values set as
valueandlabelrespectively.
- An array of
Before:
dcc.Dropdown( options=[ {'label': 'New York', 'value': 'New York'}, {'label': 'Montreal', 'value': 'Montreal'}, ], value='New York' )
or
dcc.Dropdown( options=[ {'label': 'New York', 'value': 'NYC'}, {'label': 'Montreal', 'value': 'MTL'}, ], value='New York' )
After:
dcc.Dropdown(['New York', 'Montreal'], 'New York')
Or
dcc.Dropdown({'NYC': 'New York', 'MTL': 'Montreal'}, 'New York')
RangeSlider&Slider- Rearranged Keyword Arugments -
min,max, andstepare now the first three keyword arguments which means they can be supplied as positional arguments without the keyword. - Flexible Types
stepwill be calculated implicitly if not given.markswill be auto generated if not given. It will useminandmaxand will respectstepif supplied. Auto generated marks labels are SI unit formatted. Around 5 human-readable marks will be created.- To remove the Slider's marks, set
marks=None.
Before:
dcc.Slider(marks={1: 2, 2: 2, 3: 3})
After:
dcc.Slider(min=1, max=3, step=1)
Or equivalently:
dcc.Slider(1, 3, 1)
Step can also be omitted and the
Sliderwill attempt to create a nice, human readable step with SI units and around 5 marks:dcc.Slider(0, 100)
The SI units and ranges supported in
marksare:µ- micro, 10⁻⁶m- milli, 10⁻³(none) - 10⁰k- kilo, 10³M- mega, 10⁶G- giga, 10⁹T- tera, 10¹²P- peta, 10¹⁵E- exa, 10¹⁸
Ranges below 10µ are not supported by the Slider. This is a bug: #1766
DataTable- Rearranged Keyword Arguments -
dataandcolumnsthe first twokeyword arguments which means they can be supplied as positional arguments without the keyword. - Inferred Properties - If
columnsisn't supplied then it is extracted from the the first row indata
Before:
dash_table.DataTable(data=df.to_dict('records'), columns=[{'name': i, 'id': i} for i in df.columns])
After:
dash_table.DataTable(data=df.to_dict('records'))
New Component Properties
Checklist&RadioItems- A new property
inlineappendsdisplay: inline-blocktolabelStyle.
dcc.Checklist(inline=True)
Fixed
-
#1879 Delete redundancy in pattern-matching callback implementation, specifically when
ALLandMATCHwildcards are used together. This patch was submitted by an anonymous Dash Enterprise customer. Many thanks! -
#1858 Support
mini-css-extract-pluginWebpack plugin with@plotly/webpack-dash-dynamic-importnode package - used by components to support dash async chunks. Updated dependencies of other@plotlynode packages. -
#1836 Fix
__all__in dcc and table for extras: dcc download helpers and table format helpers. This also restores this functionality to the obsolete top-level packagesdash_core_componentsanddash_table. -
#1822 Remove Radium from renderer dependencies, as part of investigating React 17 support.
-
- Clean up our handling of serialization problems, including fixing
orjsonfor Python 3.6 - Added the ability for
dash.testingpercy_snapshotmethods to choose widths to generate.
- Clean up our handling of serialization problems, including fixing
-
#1778 DataTable: Fix React warnings stating
that each child in a list should have a unique "key" prop -
#1895 Support debug=True if native namespace-packages are present
Dash v2.0.0
Dash and Dash Renderer
Added
- #1702 Added a new
@app.long_callbackdecorator to support callback functions that take a long time to run. See the PR and documentation for more information. - #1514 Perform json encoding using the active plotly JSON engine. This will default to the faster orjson encoder if the
orjsonpackage is installed. - #1736 Add support for
request_refresh_jwthook and retry requests that used expired JWT tokens.
Changed
- #1679 Restructure
dash,dash-core-components,dash-html-components, anddash-tableinto a singular monorepo and move component packages intodash. This change makes the component modules available for import within thedashnamespace, and simplifies the import pattern for a Dash app. From a development standpoint, all future changes to component modules will be made within thecomponentsdirectory, and relevant packages updated with thedash-update-componentsCLI command. - #1707 Change the default value of the
compressargument to thedash.Dashconstructor toFalse. This change reduces CPU usage, and was made in recognition of the fact that many deployment platforms (e.g. Dash Enterprise) already apply their own compression. If deploying to an environment that does not already provide compression, the Dash 1 behavior may be restored by addingcompress=Trueto thedash.Dashconstructor. - #1734 Added
npm run buildscript to simplify build process involvingdash-rendererand subcomponent libraries withindash.
Dash Core Components
Added
-
#1729 Include F#, C#, and MATLAB in markdown code highlighting, for the upcoming .NET and MATLAB flavors of dash.
-
#1735 Upgrade Plotly.js to v2.4.2. This includes:
- Feature release 2.3.0:
- More number formatting options due to
d3-formatupgrade. - Many new
geoprojections. - Improved rendering and performance of
scattergl,splomandparcoordstraces.
- More number formatting options due to
- Feature release 2.4.0:
legend.groupclickbboxof hover items in event data, to support custom dash-driven hover effects
- Patch releases 2.3.1, 2.4.1, and 2.4.2 containing various bug fixes.
- Feature release 2.3.0:
-
#1735 New
dcc.Tooltipcomponent. This is particularly useful for rich hover information ondcc.Graphcharts, using thebboxinformation included in the event data in plotly.js v2.4.0
Dash Table
Added
- #1729 Include F#, C#, and MATLAB in markdown code highlighting, for the upcoming .NET and MATLAB flavors of dash.
Dash HTML Components
Removed
- #1734 Removed the following obsolete
htmlelements -<command>,<element>,<isindex>,<listing>,<multicol>,<nextid>. These are obsolete and had been previously removed from the reference table.
Dash v1.21.0
Dash and Dash Renderer
Added
- #1675 Add new
Dashconstructor argumentextra_hot_reload_paths. This allows you to re-initialize the Python code of the app when non-Python files change, if you know that these files impact the app.
Changed
- #1675 Remove the constraint that
requests_pathname_prefixends withroutes_pathname_prefix. When you are serving your app behind a reverse proxy that rewrites URLs that constraint needs to be violated. - #1611 and #1685 Package dash-renderer artifacts and dependencies with Dash, and source renderer resources from within Dash.
- #1567 Julia component generator puts components into
src/jl- fixes an issue on case-insensitive filesystems when the component name and module name match (modulo case) and no prefix is used. Also reduces JS/Julia clutter in the overloadedsrcdirectory.
Fixed
- #1664 Fix #1649, makes the devtools readable with a dark theme.
- #1640 Fix #1475, missing
timing_informationafter certain modifications to Flask behavior
Dash Core Components
Fixed
-
This applies the fix from #878 to the RangeSlider.
It not only fixes the bug where the tooltips were visible when slider was not, but it also reduces the lag in the
tooltip when the slider handles are moved.
Updated
- #939 Upgrade Plotly.js to v2.2.1. Note that this is a major version upgrade to Plotly.js, however we are not treating this as a breaking change for DCC as the majority of breaking changes in Plotly.js do not affect the Dash API. The one exception is that several trace types that have long been deprecated are removed entirely.
- Major release 2.0.0:
- Stop exporting d3 as
Plotly.d3, and remove many other deep pieces of the public API. This does not affect thedcc.Graphcomponent, but if you make use ofPlotlyfrom the global scope in some other way you may be affected. - Drop the deprecated trace types
contourglandarea, as well as legacy pre-scatterpolarpolar attributesbar.r,bar.t,scatter.r,scatter.t,layout.radialaxis,layout.angularaxis. Usescatterpolar,barpolar, andpolarsubplots instead. heatmapglandpointcloudtrace types, and thetransformattribute are deprecated, and will be removed in a future release.- Increase CSP safety by removing function constructors. 3D plots still use function constructors, but if you place one of the non-3D bundles (including the new
strictbundle) in yourassetsfolder you will have no function constructors. - Remove "Aa" text in legends.
- Default
hovermodeto "closest". - Default
textpositionto "auto" inbartraces. If you previously used thebar.textattribute for hover only, you will need to explicitly settextposition="none". - Add
bar.marker.pattern,image.zsmooth, and various other features and bugfixes.
- Stop exporting d3 as
- Feature release 2.1.0:
- New
icicletrace type. - New
legendranktrace attribute. - Several other additions and bug fixes.
- New
- Feature release 2.2.0:
- Legend group titles
- Half-year directive (
%h) for date formatting - Several other bug fixes and performance improvements
- Patch release 2.2.1 containing a security fix.
- Major release 2.0.0:
Added
- #932 Adds a new copy to clipboard component.
- #948] Adds
disabled_daysprop toDatePickerRangeandDatePickerSinglecomponents. With this prop you can specify days that should be made unselectable in the date picker, in addition to those that fall outside of the range specified bymin_date_allowedandmax_date_allowed.
Changed
- #972 Updated R package vignettes and
dash-info.yamlto regenerate examples without attaching now-deprecated core component packages (dashHtmlComponents,dashCoreComponents, ordashTable).
Dash HTML Components
Changed
- #194 Updated dependencies and build process
- #190 Updated R package vignettes and
dash-info.yamlto regenerate examples without attaching now-deprecated core component packages (dashHtmlComponents,dashCoreComponents, ordashTable).
Dash Table
Fixed
Added
-
- Added
htmloption tomarkdown_optionsprop. This enables the use of html tags in markdown text.
- Added
-
- Case insensitive filtering
- New props:
filter_options- to control case of all filters,columns.filter_options- to control filter case for each column - New operators:
i=,ieq,i>=,ige,i>,igt,i<=,ile,i<,ilt,i!=,ine,icontains- for case-insensitive filtering,s=,seq,s>=,sge,s>,sgt,s<=,sle,s<,slt,s!=,sne,scontains- to force case-sensitive filtering on case-insensitive columns
Changed
- #918 Updated all dependencies. In particular the
highlight.jsupgrade changes code highlighting in markdown: we have long used their "github" style, this has been updated to more closely match current github styles. - #901 Updated R package
dash-info.yamlto regenerate example without attaching now-deprecated core component packages (dashHtmlComponents,dashCoreComponents, ordashTable).
Dash v1.20.0
Dash and Dash Renderer
Changed
- #1531 Update the format of the docstrings to make them easier to read in the reference pages of Dash Docs and in the console. This also addresses #1205
- #1553 Increase the z-index of the Dash error menu from 1001 to 1100 in order to make sure it appears above Bootstrap components.
Fixed
- #1546 Validate callback request
outputsvsoutputto avoid a perceived security issue.
Dash Core Components
Added
- #863 Adds a new
Downloadcomponent. Along with this several utility functions are added to help construct the appropriate data format:dcc.send_file- send a file from diskdcc.send_data_frame- send aDataFrame, using one of its writer methodsdcc.send_bytes- send a bytestring or the result of a bytestring writerdcc.send_string- send a string or the result of a string writer
Changed
Fixed
- #930 Fixed a bug #867 with
DatePickerRangethat would sometimes shift the allowed dates by one day. - #934 Fixed a bug in
EnhancedTabcomponent that ignoreddisabled_classNameproperty
Dash HTML Components
Fixed
-
#179 - Fixes #77 Added
allowandreferrerPolicyproperties tohtml.Iframe -
#178 - Fix #161
dataproperty, and fix #129 obsolete, deprecated, and discouraged elements. No elements were removed, but comments were added to the documentation about these elements detailing their limitations.Dash Table
Changed