Spaces:
Runtime error
Runtime error
updated logic
Browse files
app.py
CHANGED
@@ -4,15 +4,23 @@ import plotly.graph_objects as go
|
|
4 |
import inspect
|
5 |
|
6 |
@st.experimental_memo
|
7 |
-
def
|
8 |
-
import plotly.
|
9 |
-
import
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
tab1, tab2 = st.tabs(["Streamlit theme (default)", "Plotly native theme"])
|
18 |
with tab1:
|
|
|
4 |
import inspect
|
5 |
|
6 |
@st.experimental_memo
|
7 |
+
def get_chart_8690132():
|
8 |
+
import plotly.graph_objects as go
|
9 |
+
import pandas as pd
|
10 |
+
|
11 |
+
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/96c0bd/sunburst-coffee-flavors-complete.csv')
|
12 |
+
|
13 |
+
fig = go.Figure(go.Treemap(
|
14 |
+
ids = df.ids,
|
15 |
+
labels = df.labels,
|
16 |
+
parents = df.parents,
|
17 |
+
pathbar_textfont_size=15,
|
18 |
+
root_color="lightgrey"
|
19 |
+
))
|
20 |
+
fig.update_layout(
|
21 |
+
uniformtext=dict(minsize=10, mode='hide'),
|
22 |
+
margin = dict(t=50, l=25, r=25, b=25)
|
23 |
+
)
|
24 |
|
25 |
tab1, tab2 = st.tabs(["Streamlit theme (default)", "Plotly native theme"])
|
26 |
with tab1:
|