Is there a documentation for exact parameters used in Streamlit theme for Plotly charts (e.g., title/axis title font, font size, position, chart color scheme, margins, etc.)?
I saw the documentation page with examples (https://plotly.streamlit.app/), but I couldn’t find the code for how the Streamlit theme itself is configured.
One specific property I can’t figure out is the space between plot border and axes. How is y=0 treated in the screenshot below? It’s not taking the blue color from the gridcolor argument, nor the thicker black from the showline argument.
See screenshot and code below - the exact same code was used to produce both charts except for theme=“streamlit” and theme=None (and titles accordingly).
Thank you for your help!
Justinas
fig = go.Figure()
fig.add_trace(
go.Scatter(
x=[0, 1, 2, 3, 4],
y=[0, 2, 4, 2, 0],
line=dict(color="green", width=4),
)
)
fig.update_layout(
title="streamlit themed chart",
yaxis_title="y-value",
xaxis_title="x-value",
paper_bgcolor="rgba(213,213, 213,50)",
plot_bgcolor="rgba(255,220,220,50)",
yaxis_range=[0, 6],
xaxis_range=[0, 6],
)
fig.update_xaxes(showline=True, linewidth=2, linecolor="black")
fig.update_yaxes(
showline=True,
linewidth=2,
linecolor="black",
gridwidth=1,
gridcolor="blue",
)
st.plotly_chart(fig, theme="streamlit", use_container_width=True)