Automatic Alignment of Sunburst Segments to Clock Positions in Plotly

Hello everyone,

I’m working on a Plotly Sunburst chart and I’ve run into an issue with segment placement:

  • Category B is currently rendered at approximately “09:00”, but I need it closer to “09:30”.
  • Category C appears around “03:00”, yet it should be near “05:00–05:30”.
  • The other categories (A, D, E) are automatically centered at their correct “clock” positions without any manual adjustment.

I want to achieve this automatically, without manually tweaking the global rotation or hard-coding degree values for each segment.

Questions for the community:

  1. Is it possible to dynamically calculate a start angle per top-level segment based on its value (or a custom “time” property) so that it aligns to a desired clock position?
  2. Are there any features or plugins available that allow sector-wise alignment of sunburst slices to specific positions automatically?

I’ll upload a screenshot of the current layout shortly. Any pointers or experiences would be greatly appreciated!

Thanks in advance,

Narfianer

Welcome to the forums, @Narfianer,

could you provide sample code to generate the graph you included as image? It might help to speed up a potential answer.

I’d be happy to post the code, but unfortunately I can only insert a limited amount of text and I’m not allowed to add files. How can I post the code?