Skip to content

Hover label order for overlapping points is backwards when using WebGL #4999

Open

Description

@frseguin

In a scatter plot with overlapping points, when the hovermode is set to closest, the usual behavior is to show only the information of the trace that is the most in the foreground, that is the latest one to be added, equivalently the one with largest trace number.

example: https://plotly.com/~frseguin/3/

I have noticed that when using WebGL, the information shown is instead of the trace most in the background, equivalently the trace with the smallest number. I do not know if this behavior is intended or not, but seeing as it is different from the regular scatter plot, I thought it might be a bug.

example: https://plotly.com/~frseguin/5/

My use case is the following. I have a line plot on which I want to highlight certain points with markers, but not all of them. I am adding a markers trace for those points on top of the lines trace so that it is visible. I also want the hover info to display the info from markers. At the moment, in WebGL, I can't seem to be able to do both (Trace on top and display hover info).

Thank you very much for your help.

Activity

  1. gvwilson commented on Jun 17, 2024

    @gvwilson
    Contributor

    Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson

  2. aviezerl commented on Jun 28, 2024

    @aviezerl

    The issue still exists in version 4.10.4 (R package) and is still of concern when using WebGL.

  3. self-assigned this
    on Jul 2, 2024
  4. removed their assignment
    on Aug 2, 2024
  5. Lexachoc commented on Oct 9, 2026

    @Lexachoc
    Contributor

    I missed this earlier and opened #8077 for the same issue. It has since been fixed by #8079.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething broken

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions