We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e258e5c commit 8a9021aCopy full SHA for 8a9021a
Python_Begginer_Projects/Amazing/sunburst_chart.py
@@ -1,22 +1,18 @@
1
-import plotly graph_objects as go
+import plotly.graph_objects as go
2
3
-labels = ["Root", "Branch 1",
4
- "Branch 2", "Leaf 1", "Leaf 2",
5
- "Leaf 3"]
+labels = ["Root", "Branch 1","Branch 2", "Leaf 1", "Leaf 2", "Leaf 3"]
6
7
-parents = ["'', "Root",
8
- "Root", "Branchir1g, "Branch 1", "Branch 2"]
+parents = ['', "Root","Root", "Branch 1", "Branch 1", "Branch 2"]
9
10
values = [10, 5, 5, 2, 3, 5]
11
12
-fig = go. Figure(go. Sunburst(
13
-labels=labels,
+fig = go.Figure(go.Sunburst(labels=labels,
14
parents=parents,
15
values=values,
16
-branchvalues="total", ))
+branchvalues="total" ))
17
18
fig. update_layout(
19
title="Sunburst Chart in Python",
20
-margin=dict (t=30, 1=0, r=0, b=0))
+margin=dict (t=30, l=0, r=0, b=0))
21
22
-fig. show()
+fig. show()
0 commit comments