Skip to content

Commit 254c7ee

Browse files
committed
Swap theme and use_container_width order in commands
1 parent 371e6f5 commit 254c7ee

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

content/library/api/charts/altair_chart.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ tab1, tab2 = st.tabs(["Streamlit theme (default)", "Altair native theme"])
3131
with tab1:
3232
# Use the Streamlit theme.
3333
# This is the default. So you can also omit the theme argument.
34-
st.altair_chart(chart, use_container_width=True, theme="streamlit")
34+
st.altair_chart(chart, theme="streamlit", use_container_width=True)
3535
with tab2:
3636
# Use the native Altair theme.
37-
st.altair_chart(chart, use_container_width=True, theme=None)
37+
st.altair_chart(chart, theme=None, use_container_width=True)
3838
```
3939

4040
Click the tabs in the interactive app below to see the charts with the Streamlit theme enabled and disabled.
@@ -104,9 +104,9 @@ chart = alt.vconcat(points, bars, data=source, title="Seattle Weather: 2012-2015
104104
tab1, tab2 = st.tabs(["Streamlit theme (default)", "Altair native theme"])
105105

106106
with tab1:
107-
st.altair_chart(chart, use_container_width=True theme="streamlit")
107+
st.altair_chart(chart, theme="streamlit", use_container_width=True)
108108
with tab2:
109-
st.altair_chart(chart, use_container_width=True, theme=None)
109+
st.altair_chart(chart, theme=None, use_container_width=True)
110110
```
111111

112112
</Collapse>

content/library/api/charts/plotly_chart.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ tab1, tab2 = st.tabs(["Streamlit theme (default)", "Plotly native theme"])
3535
with tab1:
3636
# Use the Streamlit theme.
3737
# This is the default. So you can also omit the theme argument.
38-
st.plotly_chart(fig, use_container_width=True, theme="streamlit")
38+
st.plotly_chart(fig, theme="streamlit", use_container_width=True)
3939
with tab2:
4040
# Use the native Plotly theme.
41-
st.plotly_chart(fig, use_container_width=True, theme=None)
41+
st.plotly_chart(fig, theme=None, use_container_width=True)
4242
```
4343

4444
Click the tabs in the interactive app below to see the charts with the Streamlit theme enabled and disabled.
@@ -63,9 +63,9 @@ fig = px.scatter(
6363

6464
tab1, tab2 = st.tabs(["Streamlit theme (default)", "Plotly native theme"])
6565
with tab1:
66-
st.plotly_chart(fig, use_conatiner_width=True, theme="streamlit")
66+
st.plotly_chart(fig, theme="streamlit", use_conatiner_width=True)
6767
with tab2:
68-
st.plotly_chart(fig, use_conatiner_width=True, theme=None)
68+
st.plotly_chart(fig, theme=None, use_conatiner_width=True)
6969
```
7070

7171
Notice how the custom color scale is still reflected in the chart, even when the Streamlit theme is enabled 👇

content/library/api/charts/vega_lite_chart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ with tab1:
4242
# Use the Streamlit theme.
4343
# This is the default. So you can also omit the theme argument.
4444
st.vega_lite_chart(
45-
source, chart, use_container_width=True, theme="streamlit"
45+
source, chart, theme="streamlit", use_container_width=True
4646
)
4747
with tab2:
4848
st.vega_lite_chart(
49-
source, chart, use_container_width=True, theme=None
49+
source, chart, theme=None, use_container_width=True
5050
)
5151
```
5252

0 commit comments

Comments
 (0)