Python Plotly破折号:溢出到省略号中只有一个datatable列
将文本溢出为短划线数据表的省略号的示例似乎适用于所有需要它的列。 是否可以指定我要将此应用于哪些列Python Plotly破折号:溢出到省略号中只有一个datatable列,python,plotly-dash,Python,Plotly Dash,将文本溢出为短划线数据表的省略号的示例似乎适用于所有需要它的列。 是否可以指定我要将此应用于哪些列 app.layout = dash_table.DataTable( data=df.to_dict('records'), columns=[{'id': c, 'name': c} for c in df.columns], style_cell={ 'overflow': 'hidden', 'textOverflow': 'ellip
app.layout = dash_table.DataTable(
data=df.to_dict('records'),
columns=[{'id': c, 'name': c} for c in df.columns],
style_cell={
'overflow': 'hidden',
'textOverflow': 'ellipsis',
'maxWidth': 0
}
)
假设我想让“第1列”溢出到省略号中,而不是其他的
谢谢 您可以使用
style\u data\u conditional
属性将给定样式仅应用于某些列,请参见。在您的情况下,代码应该是这样的:
style_data_conditional=[{'if': {'column_id': 'column 1'}, 'textOverflow': 'ellipsis'}]