Data Apps & Dashboards for Python. No JavaScript Required.
MIT License
Bot releases are visible (Hide)
Published by T4rk1n over 1 year ago
Published by T4rk1n almost 2 years ago
Published by T4rk1n almost 2 years ago
placeholder_text
property to filterOptions
for DataTable which allows overriding the default filter field placeholder.sankey
links, and editSelection
option to config.scatter
and scatter-like traces and increased control of automargin and legend sizingscattermapbox
traces and restricted bounds to mapbox
plots.pages_folder
is nested, or the 404 page is nested inside pages_folder
.before_first_request
as reported in #2177.flask-compress
dependency to new extras requires dash[compress]
Published by T4rk1n about 2 years ago
plotly.js
from dcc.Graph
are properly sequenced even if React initiates multiple render cycles in quick succession.dash.page_registry
.suppress_callback_exceptions=True
the validation_layout
is not set.dash[testing]
is not installed.Published by T4rk1n about 2 years ago
plotly_selected
event on plot API calls and GUI edits.sankey
select error (regression introduced in 2.13.0).sankey
traces to fix select error.dragmode
s when an existing selection is modified.Published by T4rk1n over 2 years ago
maxHeight
to Dropdown options menu.background=False
to dash.callback
to use instead of app.long_callback
.app.long_callback
arguments to dash.callback
(interval
, running
, cancel
, progress
, progress_default
, cache_args_to_ignore
, manager
)search
prop to dcc.Dropdown
options, allowing to search the dropdown options with something other than the label or value.cell_selectable=False
..
were not excluded when building dash.page_registry
.not_found_404
page is incorrect in the dash.page_registry
when not using the pages
folder.React.FC
empty valueDeclaration error & support empty props components.dcc.Dropdown
search with component as prop for option label.dash.long_callback.managers.CeleryLongCallbackManager
, use dash.CeleryManager
instead.dash.long_callback.managers.DiskcacheLongCallbackManager
, use dash.DiskcacheManager
instead.long_callback_manager
in favor of background_callback_manager
.selections
, newselection
, and activeselection
, along with an updated UI allowing you to modify a selection you created.parcoords
traces.violin
traces.automargin
behavior.Published by T4rk1n over 2 years ago
args_grouping
function.app = Dash(meta_tags=[{"name": "viewport"}])
path
to the pages_folder
was incorrect on Windows.args_grouping_values
property which was incompatible with pattern-matching callbacks.Published by T4rk1n over 2 years ago
pages
- a better way to build multi-page apps. For more information see the forum post.
wait_for_class_to_equal
and wait_for_contains_class
methods to dash.testing
find_element
and find_elements
to accept an attribute
argument that aligns with Selenium's By
class, allowing you to search elements by other attributes. Default value is CSS_SELECTOR
to maintain backwards compatibility with previous find_elements
.dangerously_allow_html=True
+ mathjax=True
works in some cases, and in some cases not.dcc.Dropdown
with a value but no options.DASH_DEBUG
as environment variable gets ignored.Published by alexcjohnson over 2 years ago
dash[testing]
is not installed.Published by alexcjohnson over 2 years ago
#1952 Improved callback_context
dash.ctx
, a more concise name for dash.callback_context
ctx.triggered_prop_ids
, a dictionary of the component ids and props that triggered the callback.ctx.triggered_id
, the id
of the component that triggered the callback.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_target
prop to dcc.Markdown component. Closes #1827
#2035 Add type annotations to testing fixtures.
#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_headers
and style_header_conditional
to 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:
#1751 Rename app.run_server
to app.run
while preserving app.run_server
for backwards compatibility.
#1839 The callback
decorator 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
black
to v22.3.0 for Python 3.7+ - if you use dash[ci]
and you call black
, this may alter your code formatting slightly, including more consistently breaking Python 2 compatibility.Published by alexcjohnson over 2 years ago
Published by alexcjohnson over 2 years ago
dcc.Markdown
and dcc.Graph
. A new boolean prop mathjax
was added to these two components, defaulting to False
. Set mathjax=True
to enable math rendering. This work uses MathJax v3, although dcc.Graph
and Plotly.js can also be used with MathJax v2.
dcc.Markdown
this 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.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.fillpattern
for scatter
traces with filled areaunsafe-eval
. Please note: the regl
-based traces (scattergl
, scatterpolargl
, parcoords
, and splom
) are only strict in the strict
bundle, which is NOT served by default in Dash. To use this bundle with Dash, you must either download it and put it in your assets/
folder, or include it as an external_script
from the CDN: https://cdn.plot.ly/plotly-strict-2.11.0.min.js. All other trace types are strict in the normal bundle.mesh3d
traces.#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 customdata
with clickData
and other events.
Published by alexcjohnson over 2 years ago
dash.get_relative_path
dash.strip_relative_path
dash.get_asset_url
dash.callback
where you don't need the app
object. It makes it possible to use thesepages
folder of a multi-page app without running into the circular app
imports issue.#1911 Upgrade Plotly.js to v2.9.0 (from v2.8.3).
ticklabelstep
to axes to reduce tick labels while still showing all ticks./assets
vs the versions built into dcc
or ddk
.#1930 Upgrade JavaScript dependencies across renderer and all components.
Published by alexcjohnson over 2 years ago
#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:
no-unsafe-eval
CSP rules.smith
subplots and scattersmith
traces, for drawing Smith charts.histogram
traces.uirevision
and autorange
that pops up in some cases of mixed clientside / serverside figure generation.heatmap
and related trace types.#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
moduledash[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.#1883 in DataTable added page_current
to persisted_props
as requested in #1860
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.
Dropdown
, RadioItem
, and Checklist
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.options
can be supplied in two new forms:
string|number|bool
where label
and value
are equal to the items in the list.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
min
, max
, and step
are now the first three keyword arguments which means they can be supplied as positional arguments without the keyword.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.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: https://github.com/plotly/dash/issues/1766
DataTable
data
and columns
the first twokeyword arguments which means they can be supplied as positional arguments without the keyword.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'))
Checklist
& RadioItems
inline
appends display: inline-block
to labelStyle
.dcc.Checklist(inline=True)
#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.
orjson
for Python 3.6dash.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
Published by HammadTheOne about 3 years ago
@app.long_callback
decorator to support callback functions that take a long time to run. See the PR and documentation for more information.orjson
package is installed.request_refresh_jwt
hook and retry requests that used expired JWT tokens.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.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.npm run build
script to simplify build process involving dash-renderer
and subcomponent libraries within dash
.#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:
d3-format
upgrade.geo
projections.scattergl
, splom
and parcoords
traces.legend.groupclick
bbox
of hover items in event data, to support custom dash-driven hover effects#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
html
elements - <command>
, <element>
, <isindex>
, <listing>
, <multicol>
, <nextid>
. These are obsolete and had been previously removed from the reference table.Published by alexcjohnson over 3 years ago
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.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.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.timing_information
after certain modifications to Flask behaviorThis 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.
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.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.strict
bundle) in your assets
folder you will have no function constructors.hovermode
to "closest".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"
.bar.marker.pattern
, image.zsmooth
, and various other features and bugfixes.icicle
trace type.legendrank
trace attribute.%h
) for date formattingdisabled_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
.dash-info.yaml
to regenerate examples without attaching now-deprecated core component packages (dashHtmlComponents
, dashCoreComponents
, or dashTable
).dash-info.yaml
to regenerate examples without attaching now-deprecated core component packages (dashHtmlComponents
, dashCoreComponents
, or dashTable
).html
option to markdown_options
prop. This enables the use of html tags in markdown text.filter_options
- to control case of all filters, columns.filter_options
- to control filter case for each columni=
, 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 columnshighlight.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.dash-info.yaml
to regenerate example without attaching now-deprecated core component packages (dashHtmlComponents
, dashCoreComponents
, or dashTable
).Published by harryturr over 3 years ago
outputs
vs output
to avoid a perceived security issue.Download
component. 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 a DataFrame
, 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 writerDatePickerRange
that would sometimes shift the allowed dates by one day.EnhancedTab
component that ignored disabled_className
property#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.
Published by harryturr over 3 years ago
dash.callback_context
this addresses many use cases which require circular callbacks.dash[testing]
requirements for easier integration in external projects. This PR also bumps many dash[dev]
requirements.get_asset_url
now pulls from an external source if assets_external_path
is set.
_add_assets_resource
to build asset urls the same way as get_asset_url
.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.import dash
fail with a cryptic error message asking whether you have a file named "dash.py"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.drag_value
prop to dcc.Slider
to be able to fire callbacks from dragging and releasing the slider.Published by harryturr almost 4 years ago
Published by harryturr almost 4 years ago
ticklabelposition
attribute to cartesian axes and colorbars #5275
autotypenumbers
to axes and layout
#5240
itemwidth
to legends #5212
root.color
attribute to sunburst
and treemap
traces #5232, #5245