-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
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 <g>
roup (using querySelector('.trace' + point.uid)
)... but not for bar traces.
Or maybe there is an easier way to retrieve the <g>
roup from the hovered point (or its trace)?
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.
Feature
Scatter traces have always 3 classnames:
trace scatter trace{UID}
whereUID
is the trace unique ID (trace.uid
).Now bar traces can have it too:
trace bars trace{UID}
.