I’ve tried the sample data from https://community.plotly.com/t/26582 (over in the R forum) but those all work in Python with Plotly v4.2.1:
import plotly.graph_objects as go
go.Figure(
go.Sunburst(
labels = ["Seth", "Enos", "Noam", "Awan", "Enoch"],
parents = ["", "Seth", "Seth", "", "Awan"],
values = [12, 10, 2, 4, 4],
branchvalues="total"
)
)
and
import plotly.graph_objects as go
go.Figure(
go.Sunburst(
ids = [1, 2, 3, 4, 5, 6, 7, 8, 9, "1 - a", "1 - b", "2 - a", "2 - b", "3 - a", "3 - b", "4 - b", "5 - a", "5 - b", "6 - a", "6 - b", "7 - a", "7 - b", "8 - a", "8 - b", "9 - a", "9 - b"],
labels = ["Group 1", "Group 2", "Group 3", "Group 4", "Group 5", "Group 6", "Group 7", "Group 8", "Group 9", "a", "b", "a", "b", "a", "b", "b", "a", "b", "a", "b", "a", "b", "a", "b", "a", "b"],
parents = ["", "", "", "", "", "", "", "", "","1", "1", "2", "2", "3", "3", "4", "5", "5", "6", "6", "7", "7", "8", "8", "9", "9"],
values = [195, 99, 2425, 3, 379, 5182, 48, 3119, 903, 37, 158, 15, 84, 561, 1864, 3, 67, 312, 915, 4267, 19, 29, 433, 2686, 51, 852]
, branchvalues="total"
)
)