Skip to content

react + legendonly bug #3525

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
alexcjohnson opened this issue Feb 7, 2019 · 2 comments · Fixed by #3527
Closed

react + legendonly bug #3525

alexcjohnson opened this issue Feb 7, 2019 · 2 comments · Fixed by #3527
Assignees
Labels
bug something broken

Comments

@alexcjohnson
Copy link
Collaborator

Calling Plotly.react from a state with all traces visible: 'legendonly' to a new normal state breaks the plot until a fresh newPlot call.
https://codepen.io/alexcjohnson/pen/RvxLNy?editors=1010

Originally reported in plotly/dash#595

Separate note: why can't I click the legend lines/symbols to show/hide traces? I have to click the name or the space immediately above or below the legend line, but the lines/symbols themselves don't do it.

@alexcjohnson alexcjohnson added the bug something broken label Feb 7, 2019
@alexcjohnson
Copy link
Collaborator Author

This is something to do with uirevision - simply setting all traces visible: 'legendonly' in the initial figure does not trigger this bug.

@etpinard
Copy link
Contributor

etpinard commented Feb 7, 2019

Hmm, very strange. Using restyle(gd, 'visible', 'legendonly') instead of clicking on the legend items gives the correct result -> https://codepen.io/etpinard/pen/pGpdJP?editors=1010

So yeah, this is consistent with something being up with uirevision.

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