Skip to content

Commit da81602

Browse files
authored
nit: fix typo (#1375)
* Fix typo * Remove unused import
1 parent 4549543 commit da81602

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

python/api-examples-source/theming/charts.altair_custom_colors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def get_chart(use_container_width: bool):
1818

1919
# We create two selections:
2020
# - a brush that is active on the top panel
21-
# - a multi-click that is active on sthe bottom panel
21+
# - a multi-click that is active on the bottom panel
2222
brush = alt.selection_interval(encodings=["x"])
2323
click = alt.selection_multi(encodings=["color"])
2424

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import plotly.express as px
2-
import plotly.graph_objects as go
32
import streamlit as st
43

54

65
@st.cache_data
7-
def get_chart_1111(use_conatiner_width: bool):
6+
def get_chart_1111(use_container_width: bool):
87
st.subheader("Define a custom colorscale")
98
df = px.data.iris() # replace with your own data source
109
fig = px.scatter(
@@ -17,12 +16,12 @@ def get_chart_1111(use_conatiner_width: bool):
1716

1817
tab1, tab2 = st.tabs(["Streamlit theme (default)", "Plotly native theme"])
1918
with tab1:
20-
st.plotly_chart(fig, use_conatiner_width=use_conatiner_width, theme="streamlit")
19+
st.plotly_chart(fig, use_container_width=use_container_width, theme="streamlit")
2120
with tab2:
22-
st.plotly_chart(fig, use_conatiner_width=use_conatiner_width, theme=None)
21+
st.plotly_chart(fig, use_container_width=use_container_width, theme=None)
2322

2423

2524
try:
26-
get_chart_1111(use_conatiner_width=True)
25+
get_chart_1111(use_container_width=True)
2726
except Exception as e:
2827
st.exception(e)

0 commit comments

Comments
 (0)