Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[BUG]: `scatter` and `scattergl` show different hover labels for overlapping data points

Open
#8,077 2 comments 0 reactions 0 assignees View on GitHub

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

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

bug P3 size: 1
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:

Image

When moving even closer to marker center, label A will then show:

Image

For scattergl case, it always shows label A:

Image
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
1d 19h
Merged PRs (30d)
21

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from plotly/plotly.js

All issues in plotly/plotly.js

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.