Skip to content

Releases: plotly/dash

Dash v2.1.0

28 Jan 23:52
Compare
Choose a tag to compare

Changed

  • #1876 Delays finalizing Dash.config attributes not used in the constructor until init_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-eval CSP rules.
    • Feature release 2.6.0:
      • Add smith subplots and scattersmith traces, for drawing Smith charts.
    • Feature release 2.7.0:
      • Add text data for histogram traces.
      • Fix an interaction between uirevision and autorange that pops up in some cases of mixed clientside / serverside figure generation.
    • Feature release 2.8.0:
      • Add horizontal colorbars.
      • Add text data on heatmap and 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.
  • #1745:
    Improve our extras_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 the pytest plugins in the dash.testing module
    • dash[diskcache]: required if you use DiskcacheLongCallbackManager
    • dash[celery]: required if you use CeleryLongCallbackManager
    • dash[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_current to persisted_props as requested in #1860

  • #1763:

    Dash and Dash Renderer

    • Input, State, and Output now accept components instead of ID strings and Dash callback will 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 uses persistence, 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, and Checklist

    • Rearranged Keyword Arguments - options & value are now the first two keywords which means they can be supplied as positional arguments without the keyword. Supplying the keywords (options= and value=) is still supported.
    • Flexible Types - options can be supplied in two new forms:
      1. An array of string|number|bool where label and value are equal to the items in the list.
      2. A dictionary where the keys and values set as value and label respectively.

    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, and step are now the first three keyword arguments which means they can be supplied as positional arguments without the keyword.
    • Flexible Types
      • step will be calculated implicitly if not given.
      • marks will be auto generated if not given. It will use min and max and will respect step if 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 Slider will 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 marks are:

    • µ - 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 - data and columns the first twokeyword arguments which means they can be supplied as positional arguments without the keyword.
    • Inferred Properties - If columns isn't supplied then it is extracted from the the first row in data

    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 inline appends display: inline-block to labelStyle.
    dcc.Checklist(inline=True)

Fixed

  • #1879 Delete redundancy in pattern-matching callback implementation, specifically when ALL and MATCH wildcards are used together. This patch was submitted by an anonymous Dash Enterprise customer. Many thanks!

  • #1858 Support mini-css-extract-plugin Webpack plugin with @plotly/webpack-dash-dynamic-import node package - used by components to support dash async chunks. Updated dependencies of other @plotly node 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 packages dash_core_components and dash_table.

  • #1822 Remove Radium from renderer dependencies, as part of investigating React 17 support.

  • #1779:

    • Clean up our handling of serialization problems, including fixing orjson for Python 3.6
    • Added the ability for dash.testing percy_snapshot methods to choose widths to generate.
  • #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

04 Sep 01:00
2975e00
Compare
Choose a tag to compare

Dash and Dash Renderer

Added

  • #1702 Added a new @app.long_callback decorator 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 orjson package is installed.
  • #1736 Add support for request_refresh_jwt hook and retry requests that used expired JWT tokens.

Changed

  • #1679 Restructure dash, dash-core-components, dash-html-components, and dash-table into a singular monorepo and move component packages into dash. This change makes the component modules available for import within the dash namespace, and simplifies the import pattern for a Dash app. From a development standpoint, all future changes to component modules will be made within the components directory, and relevant packages updated with the dash-update-components CLI command.
  • #1707 Change the default value of the compress argument to the dash.Dash constructor to False. 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 adding compress=True to the dash.Dash constructor.
  • #1734 Added npm run build script to simplify build process involving dash-renderer and subcomponent libraries within dash.

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-format upgrade.
      • Many new geo projections.
      • Improved rendering and performance of scattergl, splom and parcoords traces.
    • Feature release 2.4.0:
      • legend.groupclick
      • bbox of 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.
  • #1735 New dcc.Tooltip component. This is particularly useful for rich hover information on dcc.Graph charts, using the bbox information 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 html elements - <command>, <element>, <isindex>, <listing>, <multicol>, <nextid>. These are obsolete and had been previously removed from the reference table.

Dash v1.21.0

13 Jul 16:17
Compare
Choose a tag to compare

Dash and Dash Renderer

Added

  • #1675 Add new Dash constructor argument extra_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_prefix ends with routes_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 overloaded src directory.

Fixed

  • #1664 Fix #1649, makes the devtools readable with a dark theme.
  • #1640 Fix #1475, missing timing_information after certain modifications to Flask behavior

Dash Core Components

Fixed

  • #963 Fixes #885

    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 the dcc.Graph component, but if you make use of Plotly from the global scope in some other way you may be affected.
      • Drop the deprecated trace types contourgl and area, as well as legacy pre-scatterpolar polar attributes bar.r, bar.t, scatter.r, scatter.t, layout.radialaxis, layout.angularaxis. Use scatterpolar, barpolar, and polar subplots instead.
      • heatmapgl and pointcloud trace types, and the transform attribute 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 strict bundle) in your assets folder you will have no function constructors.
      • Remove "Aa" text in legends.
      • Default hovermode to "closest".
      • Default textposition to "auto" in bar traces. If you previously used the bar.text attribute for hover only, you will need to explicitly set textposition="none".
      • Add bar.marker.pattern, image.zsmooth, and various other features and bugfixes.
    • Feature release 2.1.0:
      • New icicle trace type.
      • New legendrank trace attribute.
      • Several other additions and bug fixes.
    • 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.

Added

  • #932 Adds a new copy to clipboard component.
  • #948] Adds disabled_days prop to DatePickerRange and DatePickerSingle components. 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 by min_date_allowed and max_date_allowed.

Changed

  • #972 Updated R package vignettes and dash-info.yaml to regenerate examples without attaching now-deprecated core component packages (dashHtmlComponents, dashCoreComponents, or dashTable).

Dash HTML Components

Changed

  • #194 Updated dependencies and build process
  • #190 Updated R package vignettes and dash-info.yaml to regenerate examples without attaching now-deprecated core component packages (dashHtmlComponents, dashCoreComponents, or dashTable).

Dash Table

Fixed

  • #907
    • Fix a bug where pagination did not work or was not visible. #834
    • Fix a bug where if you are on a page that no longer exists after the data is updated, no data is displayed. #892

Added

  • #916

    • Added html option to markdown_options prop. This enables the use of html tags in markdown text.
  • #545

    • 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.js upgrade 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.yaml to regenerate example without attaching now-deprecated core component packages (dashHtmlComponents, dashCoreComponents, or dashTable).

Dash v1.20.0

08 Apr 22:35
49a80bb
Compare
Choose a tag to compare

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 outputs vs output to avoid a perceived security issue.

Dash Core Components

Added

  • #863 Adds a new Download component. Along with this several utility functions are added to help construct the appropriate data format:
    • dcc.send_file - send a file from disk
    • dcc.send_data_frame - send a DataFrame, using one of its writer methods
    • dcc.send_bytes - send a bytestring or the result of a bytestring writer
    • dcc.send_string - send a string or the result of a string writer

Changed

  • #923
    Set autoComplete to off in dcc.Dropdown. This fixes #808

Fixed

  • #930 Fixed a bug #867 with DatePickerRange that would sometimes shift the allowed dates by one day.
  • #934 Fixed a bug in EnhancedTab component that ignored disabled_className property

Dash HTML Components

Fixed

  • #179 - Fixes #77 Added allow and referrerPolicy properties to html.Iframe

  • #178 - Fix #161 data property, 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

    • #862 - update docstrings per #1205
    • #878 - update build process to use Webpack 5 and other latest dependencies

Dash v1.19.0

20 Jan 00:00
1ba1275
Compare
Choose a tag to compare

Dash and Dash Renderer

Added

  • #1508 Fix #1403: Adds an x button
    to close the error messages box.
  • #1525 Adds support for callbacks which have overlapping inputs and outputs. Combined with dash.callback_context this addresses many use cases which require circular callbacks.

Changed

  • #1503 Fix #1466: loosen dash[testing] requirements for easier integration in external projects. This PR also bumps many dash[dev] requirements.

Fixed

  • #1530 Dedent error messages more carefully.
  • #1527🐛 get_asset_url now pulls from an external source if assets_external_path is set.
    • updated _add_assets_resource to build asset urls the same way as get_asset_url.
    • updated doc string for assets_external_path Dash argument to be more clear that it will allways be joined with the assets_url_path argument when determining the url to an external asset.
  • #1493 Fix #1143, a bug where having a file with one of several common names (test.py, code.py, org.py, etc) that imports a dash component package would make import dash fail with a cryptic error message asking whether you have a file named "dash.py"

Dash Core Components

Fixed

  • #905 Make sure the figure prop of dcc.Graph receives updates from user interactions in the graph, by using the same layout object as provided in the prop rather than cloning it. Fixes #879.
  • #903 Part of fixing dash import bug #1143

Updated

Added

  • #888 Adds a drag_value prop to dcc.Sliderto be able to fire callbacks from dragging and releasing the slider.

Dash HTML Components

Fixed

  • #169 - part of fixing dash import bug #1143

Dash Table

Fixed

  • #854 - part of fixing dash import bug #1143

Dash v1.18.1

09 Dec 22:01
1cc7b3e
Compare
Choose a tag to compare

Dash-Core-Components

Updated

Dash v1.18.0

07 Dec 22:26
f776fa0
Compare
Choose a tag to compare

Dash-Table

Fixed

  • #844 Fix a bug where the table is using classes that are styled by Bootstrap

Dash-Core-Components

Updated

Dash v1.17.0

29 Oct 21:21
Compare
Choose a tag to compare

Dash and Dash-Renderer

Changed

  • #1442 Update from React 16.13.0 to 16.14.0

Fixed

  • #1434 Fix #1432 for Julia to import non-core component packages without possible errors.

Changed

  • #1448 Provide a hint in the callback error when the user forgot to make app.callback(...) a decorator.

Dash-Core-Components

Added

  • #871 Add Julia syntax highlighting support for dcc.Markdown

Fixed

  • #878
    • Fixed #751, a bug that causes dcc.Slider and dcc.RangerSlider tooltips to be visible even if the slider component isn't visible (e.g. overflow),

Updated

Dash-Table

Fixed

  • #841
    • Fix prop-types regression causing console errors in browser devtools
    • Fix syntax highlighting regression for Markdown cells
  • #842 Fix a regression introduced with #722 causing the tooltips to be misaligned with respect to their parent cell and incompletely addressed in #817

Added

  • #841 Add Julia syntax highlighting support for Markdown cells
  • #831 Add the tooltip_header prop and add nested prop use_with (with values: header, data, both) to the tooltip prop to configure header cell tooltips

Dash v1.16.3

07 Oct 20:54
Compare
Choose a tag to compare

Dash and Dash-Renderer

Fixed

  • #1426 Fix a regression caused by flask-compress==1.6.0 causing performance degradation on server requests

Dash v1.16.2

25 Sep 12:40
Compare
Choose a tag to compare

Dash and Dash-Renderer

Fixed

  • #1415 Fix a regression with some layouts callbacks involving dcc.Tabs, not yet loaded dash_table.DataTable and dcc.Graph to not be called
  • #1416 Make callback graph more robust for complex apps and some specific props (width in particular) that previously caused errors.