plotly / plotly/plotly.js

[BUG]: scattergl hover freezes with more than 100.000 points all with different x but same y

Abierto
#8,036 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

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

Descripción

Description

In scattergl, when you have more than 100.000 points the scattergl freezes when trying to hover, more informations in the steps to reproduce.

Steps to reproduce

In version 4.0.0
Create a scattergl with 100.000 points with x just the index of the point and y all the same.
you can use this snipper

const n = 100000;

Plotly.newPlot('graph', [{
  type: 'scattergl',
  mode: 'markers',
  x0: 0,
  dx: 1,
  y: Array(n).fill(0)
}]);

The default hovermode will be ok, no need to change it.
Try hovering on the point: the app freezes immediately.
Staying in the horizontal line of the points will make it look a little slow but normal, but when you exit from the line it freezes again.
Try removing one point (99.999 points): the freeze is gone.

Notes

Probably related to #6792 and #5790 but can't confirm if it's completely the same, this is more specific.
It is probably due to to the collapsation of the algorithm that comes in in a scattergl when there are TOO_MANY_POINTS (exactly 100.000).

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

Empieza reproduciendo el problema con el fragmento de JavaScript scattergl proporcionado en Plotly.js 4.0.0, comparando el comportamiento del hover con 100.000 y 99.999 puntos. Rastrea la ruta de hover de scattergl y el manejo de TOO_MANY_POINTS mencionado en el informe, usando las issues #6792 y #5790 como contexto. Se considera terminado cuando el hover ya no se congela ni se vuelve anormalmente lento para los datos indicados.

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

Evaluación

Stack tecnológico
javascript
Área
data-visualization
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
68/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.