Spaces:
Runtime error
Runtime error
File size: 839 Bytes
7a04bbd 672c30d 7a04bbd 4306dcf 48599fa 672c30d 4306dcf 672c30d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
import streamlit as st
import plotly.express as px
import plotly.graph_objects as go
import inspect
@st.experimental_memo
def get_chart_8690132():
import plotly.graph_objects as go
import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/96c0bd/sunburst-coffee-flavors-complete.csv')
fig = go.Figure(go.Treemap(
ids = df.ids,
labels = df.labels,
parents = df.parents,
pathbar_textfont_size=15,
root_color="lightgrey"
))
fig.update_layout(
uniformtext=dict(minsize=10, mode='hide'),
margin = dict(t=50, l=25, r=25, b=25)
)
tab1, tab2 = st.tabs(["Streamlit theme (default)", "Plotly native theme"])
with tab1:
st.plotly_chart(fig, theme="streamlit")
with tab2:
st.plotly_chart(fig, theme=None)
|