Skip to content

[feature-request] pie/sunburst label text direction #3590

Description

@destradafilm

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.

plotly pie chart labels

Activity

  1. alexcjohnson commented on Feb 28, 2019

    @alexcjohnson
    Collaborator

    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.

  2. destradafilm commented on Feb 28, 2019

    @destradafilm
    Author

    nice! I didn't even know you had a sunburst charts. Where can I find examples/docs on sunburst charts?

  3. alexcjohnson commented on Mar 1, 2019

    @alexcjohnson
    Collaborator

    Sunburst is not yet available, but coming soon!

  4. etpinard commented on Mar 5, 2019

    @etpinard
    Contributor

    I'm thinking of adding textrotation: 'radial' | 'tangent' | 'none' | 'auto' - where 'auto' is the current default.

    Any objections?

  5. alexcjohnson commented on Mar 5, 2019

    @alexcjohnson
    Collaborator

    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, 👍

  6. destradafilm commented on Mar 5, 2019

    @destradafilm
    Author

    @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' ?
  7. alexcjohnson commented on Mar 6, 2019

    @alexcjohnson
    Collaborator

    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.

  8. parthhhh commented on Jun 28, 2019

    @parthhhh
  9. changed the title [-][feature-request] pie chart label text direction[/-] [+][feature-request] pie/sunburst label text direction[/+] on Jul 11, 2019
  10. parthhhh commented on Jul 11, 2019

    @parthhhh
  11. self-assigned this
    on Dec 12, 2019
  12. added this to the v1.52.0 milestone on Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions