Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

plotly dash datatable column width

app.layout = dash_table.DataTable(
    data=df.to_dict('records'),
    columns=[{'id': c, 'name': c} for c in df.columns],
    style_cell_conditional=[
        {'if': {'column_id': 'Temperature'},
         'width': '130px'},
        {'if': {'column_id': 'Humidity'},
         'width': '130px'},
        {'if': {'column_id': 'Pressure'},
         'width': '130px'},
    ]
)
Source by dash.plotly.com #
 
PREVIOUS NEXT
Tagged: #plotly #dash #datatable #column #width
ADD COMMENT
Topic
Name
4+9 =