Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2k
Add UID as a classname to bar trace #7328#7329
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
alexcjohnson commentedJan 7, 2025
Curious what you want this for? We don’t generally consider DOM structure like this to be part of the public API so in principle it’s subject to change at any time, though in practice it has likely been very stable. |
gregdeback commentedJan 7, 2025
It's because I'm working on a project where we would like the hovered bar series to be highlighted (by changing the opacity of the others). It's easy to retrieve the UID of the hovered trace, so for scatter (& line) traces it's easy to access the |
| @@ -0,0 +1 @@ | |||
| - Add `trace{UID}` to bar traces as for scatter ones [[#7328](https://github.com/plotly/plotly.js/issues/7328)] | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| - Add`trace{UID}` to bartraces as for scatter ones[[#7328](https://github.com/plotly/plotly.js/issues/7328)] | |
| - Add`trace{UID}` to bar, histogram, funnel and waterfalltraces as for scatter ones[[#7328](https://github.com/plotly/plotly.js/issues/7328)], | |
| with thanks to@gregdeback for the contribution! |
Feature
Scatter traces have always 3 classnames:
trace scatter trace{UID}whereUIDis the trace unique ID (trace.uid).Now bar traces can have it too:
trace bars trace{UID}.