Refactor `add_vline()`, `add_hline()`, `add_hrect()`, `add_vrect()` to use Plotly.js `shape.label` attribute
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 18.8k
- Forks
- 2.8k
- Merge medio
- 16 h 26 min
- PR fusionados (30 d)
- 21
Descripción
The Plotly.py functions fig.add_vline(), fig.add_hline(), fig.add_hrect(), fig.add_vrect() accept arguments such as annotation_text which are used to create a label for the shape. This is done by creating and adding two separate objects to the Plotly.js layout: a shape, and an annotation.
However, now that Plotly.js has added support for shape labels, this is no longer necessary -- the text can be added directly as a label to the shape rather than creating two separate objects.
This would solve issues such as https://github.com/plotly/plotly.py/issues/3065 where we are doing some hacky stuff to get the label in the right place.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con las implementaciones de fig.add_vline(), fig.add_hline(), fig.add_hrect() y fig.add_vrect(), y luego compara su gestión de anotaciones con el soporte de shape.label de Plotly.js. Verifica que los cuatro helpers usen shape labels en lugar de objetos annotation separados, preservando sus argumentos label y su comportamiento de colocación.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, python
- Área
- data-visualization
- Tipo de issue
- Refactorización
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100