plotly / plotly/dash

allow deletion of data from Heat Figs with Patch()

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

Nadie ha tomado este issue todavía.

  • #2837 de @justinzhu17 — cerrado sin fusionar
feature P3
Lenguaje dominante
Python
Estrellas
24.4k
Forks
2.3k
Merge medio
2 d 7 h
PR fusionados (30 d)
13

Descripción

I am trying to delete some data from a heat fig, and it doesn't seem to be possible with patch. With patch, you would return something like

fig = Patch()
del fig['data'][0][x][0]

to delete the first item in the heatfig. The issue is that the heatfig has the following structure:

{ "data": [
    {
      "x": ["2021-12-21T19:58:00.542000", "2021-12-21T19:58:01.542000", "2021-12-21T19:58:02.542000" ],
      "y": [13500.0, 13503.33591, 13506.67183 ],
      "z": [[599.8054, 581.1404, 570.4771 ],
              [678.9323, 644.2858, 610.9979 ],
              [576.6772, 568.9164, 565.6251 ],
    }]}

and so you would need to loop through each list in the z field to remove the first item as well (as the heatfig is a 3D array). We can't know ahead of time how many items are in the z field making it impossible to delete data.

Basically, if you want to remove the first timestamp in the fig, you would need the data to look like:

{ "data": [
    {
      "x": ["2021-12-21T19:58:01.542000", "2021-12-21T19:58:02.542000" ],
      "y": [13500.0, 13503.33591, 13506.67183 ],
      "z": [[581.1404, 570.4771 ],
              [644.2858, 610.9979 ],
              [568.9164, 565.6251 ],
    }]}

I don't want to load in the whole fig as state because it is quite large (and defeats the purpose of using a Patch()).
I haven't found a work around for this yet.

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

En el issue no se mencionan archivos ni pruebas. Empieza reproduciendo el ejemplo de Patch() de una figura de mapa de calor y sigue el comportamiento actual de patch para los datos anidados x, y y z. El trabajo estará terminado cuando se pueda eliminar una marca de tiempo de la figura, actualizando los valores z correspondientes, sin cargar todo el estado de la figura.

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

Evaluación

Stack tecnológico
python
Área
data-visualization
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.