Hello everyone,
How can I control the size of the chart (figure), I need it to be wider to fill most of the screen, because this is almost the only feature of my app.
This is the API Iβm using:
plotly.express
and this is what Iβm using to display the figure:
st.plotly_chart(fig1)
Hello @Raffal_Shafiei,
st.plotly_chart
has a use_container_width
attribute to fit the chart to the width of the app, so st.plotly_chart(fig, use_container_width=True)
should do (link)
Then if you need a wide app by default, you can use st.set_page_config(layout="wide")
(link).
Would that do the trick?
Fanilo
2 Likes
Thanks @andfanilo!
st.plotly_chart(fig, use_container_width=True)
solved it!