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 UID as a classname to bar trace #7328 #7329

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gregdeback
Copy link

Feature

Scatter traces have always 3 classnames: trace scatter trace{UID} where UID is the trace unique ID (trace.uid).
Now bar traces can have it too: trace bars trace{UID}.

@alexcjohnson
Copy link
Collaborator

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
Copy link
Author

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)?

@gvwilson gvwilson changed the title Feature: Add UID as a classname to bar trace #7328 Add UID as a classname to bar trace #7328 Jan 7, 2025
@gvwilson gvwilson added feature something new community community contribution labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community community contribution feature something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants