[BUG]: `scatter` and `scattergl` show different hover labels for overlapping data points
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 62/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript
- Domain
- data-visualization
Research direction
Start with the linked CodePen reproduction and compare hover selection for overlapping points in scatter and scattergl, then trace the scattergl hover entry point and related tests. Done means both trace types select the same trace for coincident points and a regression test covers the reported ordering.
Written by the indexing model from the issue text.
Description
Description
When two traces have data points at exactly the same position, scatter and scattergl select different traces for the hover label.
In this example, both traces A and B have a point at (1, 0), with A added first and B added second.
With scatter, hovering the point shows the hover label for B (Correct).
With scattergl, hovering the same point shows the hover label for A, even though the traces and their order are otherwise identical.
I would expect scatter and scattergl to behave consistently when resolving overlapping points.
Reproducible example:
https://codepen.io/Lexachoc/pen/ogZWJKe
For scatter case:
When moving even closer to marker center, label A will then show:
For scattergl case, it always shows label A:
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 21
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from plotly/plotly.js
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
chore P3 plotly-internal size: 3 task
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
chore P1 plotly-internal size: 1 task
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
chore P3 plotly-internal size: 1 task
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
plotly/plotly.js#7648 · 3 comments ·
Maintainers usually reply within 1 day
All issues in plotly/plotly.js
Similar issues
-
status: waiting triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
freeCodeCamp/freeCodeCamp#70412 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Jason-Vaughan/TangleClaw#1884 ·
Maintainers usually reply within 1 day
-
bug good first issue web
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
microsoft/TypeScript#64453 ·
Maintainers usually reply within 1 day
-
self-driving
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day