Skip to content

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

Merged
etpinard merged 1 commit into
masterfrom
legend-toggleothers-doot-hide-traces-not-in-legend
Dec 4, 2019
Merged

Fix *toggleothers* behavior for graphs with traces not in legend#4406
etpinard merged 1 commit into
masterfrom
legend-toggleothers-doot-hide-traces-not-in-legend

Conversation

@etpinard

Copy link
Copy Markdown
Contributor

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

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
Copy Markdown
ContributorAuthor

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]))

@etpinardetpinardDec 3, 2019

Copy link
Copy Markdown
ContributorAuthor

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']

@alexcjohnsonalexcjohnson left a comment

Copy link
Copy Markdown
Collaborator

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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugsomething 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

@etpinard@alexcjohnson