Skip to content

Sunburst can only have visibility toggled for the whole chart in a button's update method #5353

@ebardie

Description

@ebardie

Using a button to toggle series of data for plots makes sense.

My use case for Sunburst (and Treemap and Icicle views on the same data) could do with having the ability to selective toggle visibility at the box/sector level. I have several categories, one of which swamps the others but is less important, so being able to toggle its children off would allow more screen real estate to be available for other sectors without having to resort to drawing two separate charts, one with the swamp and one without.

I had a button update method toggling visibility working, but only index 0 had any effect, and that surprised me by toggling the whole chart. I had expected that, for example, toggling index 42 would turn off that sector and its children. I presume from this that the whole chart is seen internally a single series?

Could the button update method be specialized for Sunburst et al. to allow toggling individual boxes and their children?

I'm using Plotly 6.3.0 with Python 3.13 on Linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2considered for next cyclebugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions