Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Can we go.table have slider to see more columns on the page

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):
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’],
# 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)

Hmm. That would be hard to do in python. In JS, you could wrap your graph in a parent div with overflow-x: scroll;.

Let me try this. Do you think my columns will not overwrite on each other… May I know if some wants to down load the table in excel sheet or any csv, can it be done?