Showing Branchvalues

With branchvalues “total”, the value of parent to represent the width of the wedge. With branchvalues “remainder”, the parent width is demarcate by its own values plus the value of children.The sum of the children cannot exceed to the sum of the parent when the branch values are set to be “total”.Lets see an example to get know more about it, shown below:

Example:

Python3




import plotly.graph_objects as go
 
fig = go.Figure(go.Sunburst(
    labels =["A", "B", "C", "D", "E", "F", "G", "H", "I"],
    parents =["", "A", "A", "C", "C", "A", "A", "G", "A" ],
    values =[11, 24, 2, 6, 7, 1, 1, 5, 4],
    branchvalues ="remainder",
))
 
fig.update_layout(margin = dict(t = 0, l = 0, r = 0, b = 0))
 
fig.show()


Output:

Sunburst Plot using graph_objects class in plotly

Plotly is a Python library which is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library.

Similar Reads

Sunburst Plot using graph_objects class

If Plotly Express does not render a good starting point, it is also accessible to custom from the more generic go.Sunburst class from plotly.graph_objects.The sunbrust is the prototype  for exhibit hierarchical data.Each level of the hierarchy is represented by one ring or circle with the innermost circle as the top of the hierarchy.The sunbrust chart without any hierarchical data looks similar to doughnut chart....

Showing Branchvalues

...

Presenting Large Number of Slices

With branchvalues “total”, the value of parent to represent the width of the wedge. With branchvalues “remainder”, the parent width is demarcate by its own values plus the value of children.The sum of the children cannot exceed to the sum of the parent when the branch values are set to be “total”.Lets see an example to get know more about it, shown below:...