Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

:mega: Dash v1.8.0 release

$
0
0

@Marc-Andre wrote:

Dash 1.8.0 is a minor release improving dcc.Graph responsiveness on page and parent element resize and adds markdown support to the DataTable.

Changelog
Dash v1.8.0

Highlights

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 the figure.layout.autosize and config.responsive flags in Plotly, it is now possible to override thedcc.Graph behavior by passing responsive=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 new presentation='markdown' option on columns that can be used with type='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
![Plotly](https://aws1.discourse-cdn.com/business7/uploads/plot/original/2X/7/7957b51729ad7fd9472879cd620b9b068d7105bb.png)'''),
    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

Read full topic


Viewing all articles
Browse latest Browse all 6271

Latest Images

Trending Articles



Latest Images