有什么方法可以把一个单元格包起来(把长的文字放在我的单元格里),并且把它们放在中心?这是我的表格。
import plotly.graph_objects as go
fig = go.Figure(data=[go.Table(
header=dict(values=['','Monday','Tuesday','Wednesday','thursday','friday','saturday','sunday'],
line_color='darkslategray',
fill_color='lightgray',
align='center'),
cells=dict(values=[['asdasdasd', 'xvxdwefsdf','asdadwq','zxvwefqewf','wqe124qs'],
["res", 'ds', 'ob', 'pww', 'kw'], # 1 column
['res1', 'ds1', 'ob1', 'pww1', 'kw1'],# 2 column
['res2', 'ds2', 'ob2qweqweqweqweqweqew', 'pww2', 'kw2'],# 3 column
['res3', 'ds3', 'ob4', 'pww3', 'kw3'],# 4 column
['res4', 'ds4', 'ob5', 'pw14151222231231dvzv3123123w4', 'kw4'],# 5 column
['Pancakes' , 'ds5', 'ob6', 'pww5', 'kw5'] ,# 6 column
['Jajecznica', 'ds6', 'obnd' , 'pww6' ,'kw6']], # 7 column
line_color='darkslategray',
fill_color='white',
align='center',
height=60))
])
values=['asdasdasd', 'xvxdwefsdf','asdadwq','zxvwefqewf','wqe124qs']
fig.update_layout(width=1300, height=700)
fig.show()