My goal is to show users a preselection in my python sunburst chart.
As an example if I use this code:
import plotly.express as px
from plotly.offline import plot
data = dict(
character=["Eve", "Cain", "Seth", "Enos", "Noam", "Abel", "Awan", "Enoch", "Azura"],
parent=["", "Eve", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve" ],
value=[10, 14, 12, 10, 2, 6, 6, 4, 4])
fig = px.sunburst(
data,
names='character',
parents='parent',
values='value'
)
plot(fig)
When I run this code, the sunburst will open up with Eve as root. I wish to start with "Seth" already selected instead. How can I do this?