Skip to content

Grouped legend alignment issue from 1.50  #4336

Description

@mjordan84

Hi,

I've been using plotly.js for a few month now (great work by the way) and noticed that since 1.50 legend groups are no longer aligned. As you can see in the attached example the 5th group is not aligned with the 2nd.
Is this an expected behaviour?

Example:
https://codepen.io/mjordan84/pen/LYYdeog

Thanks,
Marc

Activity

  1. archmoj commented on Nov 6, 2019

    @archmoj
    Contributor

    Possibly related to #4160.

  2. etpinard commented on Nov 19, 2019

    @etpinard
    Contributor

    That's correct, the behaviour changed after #4160 (released in v1.50.0).

    I didn't intend to change it (see pre-1.50.0 behaviour here: https://codepen.io/etpinard/pen/abbXKpM), but I can't say which behaviour is better. What do you think @mjordan84 and @archmoj ?

    That said, a breaking change is a breaking change, so I'll tag this as type: bug. If some people like the current (post v1.50.0) behaviour better, maybe we should think about adding a new grouped legend option.

    This ticket is somewhat related to #960

  3. etpinard commented on Nov 19, 2019

    @etpinard
    Contributor

    current:

    image

    pre v1.50.0

    image

  4. mjordan84 commented on Nov 19, 2019

    @mjordan84
    Author

    @etpinard as you said both seems valid. The new behaviour is a bit more problematic when only the first Item of each legend group is visible.
    image

  5. etpinard commented on Nov 19, 2019

    @etpinard
    Contributor

    The new behaviour is a bit more problematic when only the first Item of each legend group is visible.

    You mean when all but the first trace of each group has showlegend: false?

  6. mjordan84 commented on Nov 19, 2019

    @mjordan84
    Author

    Yes @etpinard , when the first element of each group has showlegend: true then the rest set to false in that group.
    https://codepen.io/mjordan84/pen/GRRzXoz

  7. added this to the v1.5x.0 milestone on May 12, 2020
  8. gvwilson commented on Jun 17, 2024

    @gvwilson
    Contributor

    Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson

  9. mjordan84 commented on Jun 17, 2024

    @mjordan84
    Author

    The issue is still present in the latest version.

  10. gvwilson commented on Jun 18, 2024

    @gvwilson
    Contributor

    Thanks @mjordan84 - I'll reopen it and try to get it into our backlog

  11. self-assigned this
    on Jun 18, 2024
  12. removed their assignment
    on Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething broken

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions