Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def get_chart(use_container_width: bool):

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import plotly.express as px
import plotly.graph_objects as go
import streamlit as st


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

tab1, tab2 = st.tabs(["Streamlit theme (default)", "Plotly native theme"])
with tab1:
st.plotly_chart(fig, use_conatiner_width=use_conatiner_width, theme="streamlit")
st.plotly_chart(fig, use_container_width=use_container_width, theme="streamlit")
with tab2:
st.plotly_chart(fig, use_conatiner_width=use_conatiner_width, theme=None)
st.plotly_chart(fig, use_container_width=use_container_width, theme=None)


try:
get_chart_1111(use_conatiner_width=True)
get_chart_1111(use_container_width=True)
except Exception as e:
st.exception(e)