plotly / plotly/plotly.js

Hover label order for overlapping points is backwards when using WebGL

Abierto
#4,999 2 comentarios 2 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

bug P3
Lenguaje dominante
JavaScript
Estrellas
18.3k
Forks
2k
Merge medio
2 d 12 h
PR fusionados (30 d)
28

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza reproduciendo los dos ejemplos enlazados y compara la selección mediante hover para puntos superpuestos en un scatter normal y un scatter WebGL con hovermode establecido en closest. Rastrea el comportamiento del hover de WebGL y verifica que se seleccione el trace en primer plano/más reciente; se considera terminado cuando WebGL coincida con el scatter normal y se mantenga la visibilidad de los marcadores.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
data-visualization, frontend
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.