Skip to content

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented May 14, 2019

currently named itemclick and itemdoubleclick, both enumerated attributes with values 'toggle',
'focus' (now 'toggleothers'), false. This PR could be viewed as a follow-up of #2581

resolves #665 by setting

layout = {
  legend: {
    itemclick: false,
    itemdoubleclick: false
  }
}

resolves #674 by setting

layout = {
  legend: {
    itemclick: 'focus'
  }
}

and should help us offer solutions for #1462 and #3135


cc @plotly/plotly_js

- both enumerated with values 'toggle', 'focus', false
@etpinard etpinard added this to the v1.48.0 milestone May 14, 2019
@antoinerg
Copy link
Contributor

Codepen with the new feature: https://codepen.io/antoinerg/pen/XwpvaO

@antoinerg
Copy link
Contributor

Once a legend item is focused and we want to focus on another one, we have to first unfocus (it requires 2 actions):
Peek 2019-05-15 11-17
It might be nice to cut that down to 1 action: it could focus right away on the newly selected legend item. In order to unfocus and display all traces, one would have to click on the legend item currently having the focus.

Now I understand this would be a breaking change and I am not even suggesting that we include this new mode in this PR. However, we should probably think ahead of time what its name would be. Maybe it could be called focus and the current focus could be called toggleothers as suggested by @nicolaskruchten?

@antoinerg
Copy link
Contributor

Thank you for adding customizability to our legend interactions @etpinard

💃 💃

@etpinard etpinard merged commit 425900e into master May 21, 2019
@etpinard etpinard deleted the legend-trace-toggle branch May 21, 2019 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Legend and traces toggling Add ability to disable legend trace toggling
3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy