Hover label order for overlapping points is backwards when using WebGL
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 18.3k
- Fork
- 2k
- Merge medio
- 2g 12h
- PR unite (30g)
- 28
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo i due esempi collegati e confronta la selezione al passaggio del mouse per i punti sovrapposti in uno scatter normale e in uno scatter WebGL con hovermode impostato su closest. Traccia il comportamento dell’hover di WebGL e verifica che venga selezionato il trace in primo piano/più recente; il lavoro è completato quando WebGL corrisponde allo scatter normale preservando la visibilità dei marker.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- data-visualization, frontend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100