I made this sunburst chart:
fig =go.Figure(go.Sunburst(
labels=["Type of Admission", "Other Medical", "Post Surgery", "Adult", "Pediatric",
"Readmission", "Post Cath", "adult", "pediatric", "Pre-Operative"],
parents=["","Type of Admission","Type of Admission","Post Surgery","Post Surgery",
"Type of Admission","Type of Admission","Post Cath","Post Cath","Type of Admission"],
values=[sum(count.values()),count['Other Medical'],(count['Adult Post Surgery']+count['Pediatric Post Surgery']),
count['Adult Post Surgery'],count['Pediatric Post Surgery'],
count['Readmission'],(count['Adult Post Cath']+count['Pediatric Post Cath']),
count['Adult Post Cath'],count['Pediatric Post Cath'],count['Pre-Operative']],
textinfo= 'label+value',
branchvalues= "total"))
fig= fig.update_layout(title_text="Type Of Admission (2019-Q2)",margin = dict(t=0, l=0, r=0, b=0))
fig.show()
I want to label sector percentage from the total. How this could happen?