Repository navigation
[feature-request] pie/sunburst label text direction #3590
Description
Activity
Ha good timing, we were just talking about this today regarding the sunburst charts @etpinard is working on right now, but yes, would be great to implement for pie too.
nice! I didn't even know you had a sunburst charts. Where can I find examples/docs on sunburst charts?
Sunburst is not yet available, but coming soon!
Reacted by David EstradaI'm thinking of adding
textrotation: 'radial' | 'tangent' | 'none' | 'auto'- where'auto'is the current default.Any objections?
Perhaps change
'none'to'fixed'or'constant'so it can at some point be modified with another attribute containing an angle - or an array of angles? Other than that, 👍@etpinard thanks for taking care of this.
- I'm wondering if 'tangent' will ensure that the text will always face one direction (in comparison to the preview I posted above: the tangential text with the largest slices in pie chart 1 and 2 face different directions)
- What will be the behavior if a user chooses 'tangential' but the text is super long? Will the text ellipse? Will it get super small like it currently does when you choose textposition: 'inside' ?
That's a good point @destradafilm - I would assume the default would be to always have the text "right-side-up" as referenced to the screen, but that's the behavior you don't want since a biggest slice <50% like your chart 2 would have its text rotated right, but >50% like the other two would have it rotated left. A behavior where you always have the top (for tangential) or right (for radial) edge of the text toward either the inside or outside of the circle would need to be a separate attribute.
- changed the title
[-][feature-request] pie chart label text direction[/-][+][feature-request] pie/sunburst label text direction[/+]on Jul 11, 2019
feature request for pie chart label options - to control how inside plot label directions are set.
As you see here, some of the labels from the values that are bigger slices face different directions compared to each other (one with the text bottom facing the outside of the donut, the other with the bottom facing the inside of the donut). The smaller slices have text with the bottom of text right aligned to center of donut.