Hello All,
I want to use slider to go from left to right to see more columns . The picture attached is very uglybecuase of overwriting. I can’t extend by width of the layout.
as we slide down to see more records.
I have table and data from that is rendered through plotly go.table . The nbr columns differed from table to table. I am able to slide down to see the more data which is rendered as the height of the plot is fixed.
def model_out_show_table(df,name):
df=df.head(50)
trace = go.Table(
# columnwidth=[.75, 0.75, 0.75, 0.75, 0.75, 0.75, 1, 1,1,1,1,1],
header=dict(values=[x.capitalize() for x in list(df.columns)],
fill = dict(color=’#0B0B61’),
font = dict(color = ‘#f9f9f6’, size = 14),
align = [‘left’,‘center’],
),
cells=dict(
# values=[df.gfc_id, df.cust_acct, df.cpty_acct, df.risk_date,df.feature_id,df.feature_val],
values=[df[k] for k in df.columns[:]],
# fill = dict(color=’#F5F8FF’),
# fill = dict(color=’#f9f9f6’),
line = dict(color = ‘#506784’),
align = [‘left’,‘center’],
))
layout=go.Layout(title=’’+name+ ‘’,
margin = dict(l=0,r=0 ),
# paper_bgcolor=‘rgba(0,0,0,0)’,
# plot_bgcolor=‘rgba(0,0,0,0)’
)
data = [trace]
fig = dict(data=data, layout=layout)
tblplot=plotly.offline.plot(fig,show_link=False, output_type=‘div’,include_plotlyjs=True)
return((tblplot))