Plotly chart overlapping st.columns()

I’m trying to use plotly charts in an st.column([1,1]), s that it’s next to some text, but the graph always overlaps into the text’s column if the screen resolution is played with.

Is there a workaround this situation?

Hi @teddyW,

Thanks for posting!

What is the desired behavior in this case? Would you want the text column to be narrower so the text sits next to the chart without overlapping?

Caroline :balloon:

I think a slimmer text would be okay. Though would there be functionality that actively reduces the charts width? Bc I think the issue is that charts are not adapting to scale of the page. So even in very slim displays, the chart may still overlap

You could pass the use_container_width=True to st.plotly_chart to make it get the size of the column containing the plot.

1 Like