Dynamic page layout depending on wide-mode

Is there a way to st.get_option() for page layout to determine if setting is wide-more? I realize I can use st.set_page_config(layout='wide'), but I’d like to change the layout if the end-user changes the setting manually:

if st.get_option('layout') == 'wide':
    ...
else:
    ...

Thanks.

Yes, if the user does that, I want to change my chart layout on screen.

I don’t think there is but @randyzwitch knows better about this.

Why do you want to change the chart layout if the user end-user selects centered mode, you don’t like the way it looks or you wanna change the form of your data like from line- to area chart?

My use case is… I have two columns each with displaying a chart in wide mode. If user sets to ‘narrow mode’, I’d like to stack those charts vertically in order to preserve some width for the charts.

As far as I know, you can’t programmatically determine what mode the user has set from the browser. If you’re interested, please submit a feature request on GitHub.

Best,
Randy