Hide sunburst chart text labels if they don't fit?

I am currently looking into better visualization options for our companies’ Dashboards.

I really like how plotly tries to fit the labels to the sunburst chart by turning them in the right direction. However, is there a setting to tell it to just leave away the labels that don’t fit? Because while the way it fits “transfer” in there is really nice, everything else in here looks way too unprofessional to deliver it to the customer:


The only other option seems to be to simply not display text at all - but since only the large slices really matter most of the time, leaving all text would not be preferable… The preferred behaviour would be "everything that does not fit smugly into its slice with a certain text size, just leave out…

That looks like a bug. Would you mind sharing the data / layout settings you used to help us debug? Thanks!

Below the Code used to generate the plot.
It is a visualization of folder- and subfolder-sizes. Note that there are
a) a lot of subfolders in some Folders
b) huge differences in size.
Not sure whether this is relevant.

import plotly.graph_objects as go

fig = go.Figure()

    values = df_data["size"],
    hovertext = df_data.name,
    hoverinfo = "text",
    branchvalues = "total",
    maxdepth = max_levels,
    textinfo = "none"

    grid= dict(columns=1, rows=1),
    margin = dict(t=0, l=0, r=0, b=0)


Hmm. This one is going to be hard to debug without some data attached to it.

If your data is sensitive, maybe you could try to reproduce the problem with some dummy data? Thank you!

I didn’t follow up on this since I decided to go without labels, it looks more professional that way, since my labels can be quite long.

I might actually go with D3’szoomable icicle charts in the end since these fit long names and represent proportions between different levels better. I don’t think plot.ly has these yet?

Is there a way to mark this thread closed/answered?

1 Like

I can confirm that this happens to my visualization too

1 Like