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

Add option(s) to prevent a trace (or legendgroup?) from being hidden by other traces' double-click events (or their own single-click events). #1395

Closed
zig1000 opened this issue Jan 12, 2019 · 3 comments

Comments

@zig1000
Copy link

zig1000 commented Jan 12, 2019

In some cases it is desirable to have one or more traces remain always visible on the plot, even as other traces are toggled. For example, keeping some scatter nodes fixed while toggling different sets of edges. In particular other traces' double-click events cannot currently be prevented from toggling a trace.

There are a few cases I can think of that one might want, which should probably function independently
of whether or not a trace has showlegend toggled, with the first being the main case I've run into:

  • Trace is unaffected by any double-click events (but may or may not be single-clickable).
  • Trace cannot be single-clicked (but may be affected by double-clicks).
  • [Obscure and probably not worth the potentially unexpected behaviour]: Trace is unaffected by others' double click events but its own double-click event works, or vice versa.

It seems best to add two options like ignorelegendsingleclick and ignorelegenddoubleclick to each trace (though a less granular alwaysvisible would also be sufficient for my own and probably most peoples' use cases).

It would probably also be a bonus if this worked with legendgroups - either allowing components of a legendgroup to differ in their toggleability settings and having it just work, or else raising an error if all members of a legendgroup don't share the same toggleability settings.

A further annoyance I can think of would be if one were disable all double-click functionality but then be unable to hide the "Double-click on legend to isolate one trace" tooltip that pops up when the legend is clicked. It should probably also be toggleable or else auto-disable itself when it sees all traces ignore double-click.

@zig1000 zig1000 changed the title Add option to prevent a trace (or legendgroup?) from being hidden by other traces' double-click events. Add option to prevent a trace (or legendgroup?) from being hidden by other traces' double-click events (or their own single-click events). Jan 12, 2019
@zig1000 zig1000 changed the title Add option to prevent a trace (or legendgroup?) from being hidden by other traces' double-click events (or their own single-click events). Add option(s) to prevent a trace (or legendgroup?) from being hidden by other traces' double-click events (or their own single-click events). Jan 12, 2019
@RylanSchaeffer
Copy link

+1 to "In some cases it is desirable to have one or more traces remain always visible on the plot, even as other traces are toggled." Does this functionality not currently exist?

@dpasqualin
Copy link

I'd like to see this feature too. Apparently it is already available in plotly.js.

@gvwilson
Copy link
Contributor

Hi - we are currently trying to tidy up Plotly's public repositories to help us focus our efforts on things that will help users most. Since this issue has been sitting for several years, so I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our backlog. Thanks for your help - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants