Plotly docs says I can use go.Table and use key of columnwidth and an array with the widths. Well this isn't doing much because my columns are still cutoff and cannot be made wide enough.
Any ideas on how to ensure the columns match the header and cell widths?
column_widths = [75, 75, 75, 100, 100, 100,
75, 75, 75, 75, 75, 75, 75, 100, 225]
fig = pgo.Figure(data=[pgo.Table(
columnwidth=column_widths,
header=dict(values=list(df.columns),
fill_color='lightgray',
align='center'),
cells=dict(values=df.transpose().values.tolist(),
fill_color='white',
align='left'))
])
columnwidth=[x, y, z]means the first column should take x/(x+y+z) times the table width, the 2nd column y/(x+y+z) and the 3rd z/(x+y+z).fig.update_layout(width=somewidth)? Also note that you can set the image width, height and scale during the export. @see plotly.com/python/static-image-export/…