Skip to content

Only first trace toggled when horizontal legend and legendPosition: true #2819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AlanJMac opened this issue Jul 17, 2018 · 1 comment · Fixed by #2829
Closed

Only first trace toggled when horizontal legend and legendPosition: true #2819

AlanJMac opened this issue Jul 17, 2018 · 1 comment · Fixed by #2829
Labels
bug something broken

Comments

@AlanJMac
Copy link

When the legend layout is set to the horizontal orientation and the legendPosition config variable is set to true then clicking the trace names in the legend will only toggle the visibility of the first trace.
The behaviour is as expected when the legend is vertically orientated or if its position is not editable.

The layout and config to reproduce this with 2 or more traces is as follows:

var layout = {
  legend: {
    orientation: 'h'
  }
};

var config = {
  edits: {
    legendPosition: true
  }
};

This can be seen in the following codepen: https://codepen.io/alanjmac/pen/NBNmaQ

@alexcjohnson
Copy link
Collaborator

Confirmed. Thanks @AlanJMac for the extremely clear bug report, and for the thorough research into when it does and does not occur!

@alexcjohnson alexcjohnson added the bug something broken label Jul 17, 2018
etpinard added a commit that referenced this issue Jul 19, 2018
- just like we do currently for edits.legendText,
  that way the legend dragElement instance can correctly retrieve
  the legend item bounding box
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants