So I’m trying to build a sunburst graph that displays percentParent for each element in the graph. This works fine for all elements except for when I have only a single option for the central node/ring/whatever (see example below)
Since the central node obviously does not have a parent, it appears to bug out and display the bracketed call on percentParent from the texttemplatefield. However, if there are 2 (or more) central nodes, it automatically calculates each’s percentage of the sum total of the two.
My question is:
When I have only 1 central node, how can I either hide this field for the central node only or make it correctly display “100%”?
Here I mean a change of code from plotly dev team. I was exploring fig.data and I couldn’t find a way to update the format in one case only. actually you can pass a list a text format but it looks to me that this is a not ideal solution.
I’m having the same issue with this, but my sunburst is dynamic with the selection of drop-downs so sometimes the center slice is single and other times the center is split… I tried unsuccessfully to apply some sort of logic/if statement in the texttemplate, but can’t get this to work.
It also changes the text color of the Sunburst center, which I can’t imagine is intended. This is the only search result I can find on the issues.