Minimizing the charts margins and whitespace

Hi all,
im trying to make a Table with plotly.GO and I have a lot of free “whitespace”. I tried playing with the margins but the space at the bottom is not going away. can anyone please help me out on this?

figTT = go.Figure(data=[go.Table(
    cells=dict(values=rows, line_color='darkgray', fill_color='rgba(255,255,255,0)', align=['center', 'right'],
               font=dict(color='white')),
    header=dict(values=col, fill_color='paleturquoise', font=dict(color='black'), align='center',
                line_color='darkgray'))])
figTT.update_layout(plot_bgcolor="#222222", paper_bgcolor="#222222", autosize=False, margin=dict(b=0, t=0, pad=0))

@sarah2r,
You should set a reduced height:

fig = go.Figure(go.Table(header=dict(values=['A Scores', 'B Scores']),
                 cells=dict(values=[[100, 90, 80, 90], [95, 85, 75, 95]]))
                     );
fig.update_layout(title_text='My Table', title_x=0.5,  
                  width=600, height=200, 
                  margin=dict(t=50, r=2, b=2, l=2))

table-reduced

1 Like