

St.subheader("Define a custom colorscale") Here's an example of an Plotly chart where a custom color scale is defined and reflected: import plotly.express as px For example, if you want a chart line to be green instead of the default red, you can do it! In other words, although we now enable the Streamlit theme by default, you can overwrite it with custom colors or fonts. If you're wondering if your own customizations will still be taken into account, don't worry! You can still make changes to your chart configurations. St.plotly_chart(fig, theme=None, use_container_width=True)Ĭlick the tabs in the interactive app below to see the charts with the Streamlit theme enabled and disabled. St.plotly_chart(fig, theme="streamlit", use_container_width=True) Let's look at an example of charts with the Streamlit theme and the native Plotly theme: import plotly.express as px To disable it, and use Plotly's native theme, use theme=None instead. The Streamlit theme is available from Streamlit 1.16.0 through the theme="streamlit" keyword argument. The added benefit is that your charts better integrate with the rest of your app's design. This theme is sleek, user-friendly, and incorporates Streamlit's color palette.

Plotly charts are displayed using the Streamlit theme by default.
