Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
gregdeback wants to merge2 commits intoplotly:master
base:master
Choose a base branch
Loading
fromgregdeback:pr_7328

Conversation

@gregdeback
Copy link

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}.

archmoj reacted with heart emoji
@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.

archmoj reacted with heart emoji

@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 (usingquerySelector('.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)?

archmoj reacted with heart emoji

@gvwilsongvwilson changed the titleFeature: Add UID as a classname to bar trace #7328Add UID as a classname to bar trace #7328Jan 7, 2025
@gvwilsongvwilson added featuresomething new communitycommunity contribution labelsJan 7, 2025
@@ -0,0 +1 @@
- Add `trace{UID}` to bar traces as for scatter ones [[#7328](https://github.com/plotly/plotly.js/issues/7328)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
- 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!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@archmojarchmojarchmoj left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

communitycommunity contributionfeaturesomething new

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@gregdeback@alexcjohnson@archmoj@gvwilson

[8]ページ先頭

©2009-2025 Movatter.jp