@Marc-Andre wrote:
Dash 1.8.0 is a minor release improving
dcc.Graphresponsiveness on page and parent element resize and adds markdown support to theDataTable.Changelog
Dash v1.8.0Highlights
- Update to Plotly.js 1.52.1, Plotly.js 1.52.0
- Improved
dcc.Graphresponsiveness- Table markdowns
- Various bug fixes for the DataTable and Dash
Previous Releases
Delving Deeper
Graph Responsiveness
The Plotly.js library allows the container to be resize on window resize but does not react to parent element resize, which can lead to some undesired behavior. To help usability, in addition to using thefigure.layout.autosizeandconfig.responsiveflags in Plotly, it is now possible to override thedcc.Graphbehavior by passingresponsive=False|True|'auto'(default).
- If
responsive=True: will be responsive to both window and parent resize and will override any default behavior from config/figure- If `responsive=False: will be not be responsive even if it could have been.
- If
responsive='auto'(default): will be responsive on both window and parent resize if it would otherwise have been responsive on page resize, will not be responsive otherwise.Table Markdowns
The table now has a newpresentation='markdown'option on columns that can be used withtype='text'. The table will parse the text as markdown and display the result.import dash from dash_html_components import Div from dash_table import DataTable app = dash.Dash(__name__) data=[ dict(a=''' ```javascript return 20; ``` '''), # need to dedent the ``` for actual usage dict(a='''An image\n '''), dict(a=''' _italics_\n **bold**\n ~~strikethrough~~ '''), dict(a='''Nested table Statement | Is it true? --- | --- This page has two tables | yes This table has two rows | no This is an example of tableception | yes '''), dict(a='[Dash documentation](https://dash.plot.ly)') ] app.layout = Div([ DataTable( columns=[ dict(name='a', id='a', type='text', presentation='markdown'), ], css=[ dict(selector='img[alt=Plotly]', rule='height: 50px;') ], data=data ), ]) app.run_server(debug=True)
Posts: 1
Participants: 1







