Hi there, I’m new to streamlit but absolutely love it as a library. You guys really are doing a favor to the community by bringing fun into the world of creating data apps. Sometimes I forget I am actually doing work
Ran into a slight formatting issue that I cannot seem to figure out. I’ve got some plotly charts where I set the margins to zero so they fit snugly inside the beta_columns, but I can’t seem to trim down on the vertical white spacing. In the code sample below, I have simply repeated the same chart to ensure identical formatting (for testing purposes).
layout = go.Layout( margin=go.layout.Margin( l=0, #left margin r=0, #right margin b=0, #bottom margin t=0, #top margin )) fig_1 = go.Figure(data=[go.Table( header=dict(values=list(plotly_columns), fill_color='black', font_color='white', align='center'), cells=dict(values=plotly_values, fill_color='white', align='right'))], layout=layout ) fig_1.update_layout(font=dict( family="Calibri", size=10, color='#000000' )) col_A, col_B, col_C = st.beta_columns(3) with col_A: st.plotly_chart(fig_1, use_container_width=True) st.plotly_chart(fig_1, use_container_width=True) st.plotly_chart(fig_1, use_container_width=True) with col_B: st.plotly_chart(fig_1, use_container_width=True) st.plotly_chart(fig_1, use_container_width=True) st.plotly_chart(fig_1, use_container_width=True) with col_C: st.plotly_chart(fig_1, use_container_width=True) st.plotly_chart(fig_1, use_container_width=True) st.plotly_chart(fig_1, use_container_width=True)
This is how it renders:
Thanks for your help!