I am trying to change what is being displayed on hovering in sunburst graph
but due to tree like structure I am able to use hovertemplate
in this type of graph. Can someone help me with this?
Code:
fig = px.sunburst(
dff,
path=["country_txt", "year", "Attacks", "killed"],
color="year",
color_discrete_sequence=px.colors.qualitative.Pastel,
maxdepth=-1,
branchvalues="remainder",
)
This how graph looks on hovering:
The
labels
is Attacks column
and I want to show as Attacks
instead of labels and same for leaf
is killed column
and want to show that. I donβt want to show in terms of root-->branch-->leaves
on hovering.