allow aligning hovertext for annotations
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
It looks like there is no way to control the text justification for annotation hovertexts. For example:
# Make an background image
f = px.imshow( [[255]*6]*3, origin='lower')
# Add two annotations with hovertext
f.add_annotation( x=1, y=1, text='left', hovertext='Will be left justified<br>*', showarrow=False)
f.add_annotation( x=5, y=1, text='right', hovertext='Will be right justified<br>*', showarrow=False)
# Tighten the plot
f.update_layout( margin={'l':0, 'r':0, 't':0, 'b':0}, coloraxis_showscale=False)
# This will not apply on the annotation hovertext
f.update_layout( hoverlabel_align='left')
# This does not exist and annotation hovertexts default to auto
# f.update_annotations( hoverlabel_align='left')
f.show()
The image hovertexts will be all properly left-justified, but the annotation hovertexts will default to 'auto', with the left one being left-justified, and the right one being right-justified. Am I missing something, or this is an omission in the tunable options? Is there some other way to force left-justification on the annotation hovertexts? I produce a set of tables that way that look atrocious otherwise.
Thanks!
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 API de anotaciones mostradas en f.add_annotation y el comportamiento de hoverlabel_align en f.update_layout; después, rastrea cómo se exponen las opciones de hovertext de las anotaciones. La tarea estará terminada cuando los hovertext de las anotaciones puedan recibir una configuración de alineación explícita, incluidos los ejemplos de alineación a la izquierda y a la derecha descritos en el issue.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- plotly, 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
- 45/100