plotly / plotly/plotly.py

Streamline xanchor and yanchor names for center/middle

Abierto
#5,326 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

feature P3
Lenguaje dominante
Python
Estrellas
18.8k
Forks
2.8k
Merge medio
16 h 26 min
PR fusionados (30 d)
21

Descripción

The 'xanchor' property is an enumeration that may be specified as:
- One of the following enumeration values:
['auto', 'left', 'center', 'right']

The 'yanchor' property is an enumeration that may be specified as:
- One of the following enumeration values:
['auto', 'top', 'middle', 'bottom']

This is for plotly 6.3.0 trying to use fig.add_annotations() but it likely applies everywhere where xanchor and yanchor are used.

It does make sense that for the extremes of the bounding box left right top bottom, the names are different, but why is 'center' used for x direction and 'middle' for y direction? This distinction seems artifical to me and I wonder why this was chosen?

I propose to streamline the naming conventions, but now for backwards compatibility to at least accept both center/middle for x/yanchor.

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 por el punto de entrada fig.add_annotations() y localiza cómo se validan los valores de xanchor y yanchor. Comprueba si la misma validación se comparte en otros lugares y revisa después las pruebas relacionadas. La implementación debe incluir, cuando corresponda, la aceptación compatible con versiones anteriores tanto de center como de middle, manteniendo el funcionamiento de los valores existentes.

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
3/5
Tiempo estimado
1-2 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.