Skip to content
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

Fix *toggleothers* behavior for graphs with traces not in legend #4406

Merged

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented Dec 3, 2019

fixes #4389

before: https://codepen.io/alexcjohnson/pen/MWWMVbr?editors=1010
after: https://codepen.io/etpinard/pen/VwYYWer?editors=1010

... and double-click either of the two legend items.

@plotly/plotly_js

@etpinard etpinard added bug something broken status: reviewable labels Dec 3, 2019
it('isolate trace in legend, ignore trace that is not in legend', function(done) {
Promise.resolve()
.then(click(0, 2))
.then(assertVisible([true, 'legendonly', true]))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This used to result [true. 'legendonly', 'legendonly']

it('isolate trace in legend, ignore trace that is not in legend (2)', function(done) {
Promise.resolve()
.then(click(1, 2))
.then(assertVisible(['legendonly', true, true]))
Copy link
Contributor Author

@etpinard etpinard Dec 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one used to result ['legendonly', true, 'legendonly']

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks! 💃

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 this pull request may close these issues.

Isolate a trace via legend should not hide traces with no legend entry
2 participants