Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Feature request] Allow annotations and layout images to be positioned relative to the container, not just the x/y axes or plotting area

Abierto
#7,665 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
javascript

Línea de trabajo

La solicitud se refiere al posicionamiento de anotaciones e imágenes del layout, usando como referencia el comportamiento existente de title_xref y title_yref. Empieza trazando cómo se gestionan las opciones xref y yref para las anotaciones y las imágenes, y después compáralo con el posicionamiento del título respecto al container. Se considera terminado cuando container sea compatible tanto con las anotaciones como con las imágenes sin provocar regresiones en la colocación respecto al eje o en el área de trazado; la cuestión del tamaño de imagen en píxeles fijos puede requerir un alcance separado.

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

Descripción

feature P2

One thing I really appreciate about title positioning in Plotly is that I can set title locations relative to the container, not just the plotting area or x axis, via the title_xref and title_yref settings. This makes it much easier to achieve consistent title placement across different charts, as many different factors can change the shape of the plotting area.

Would it be possible to add container as an xref and yref option for annotations and images also? I've been needing to manually adjust these across charts, which can take a decent amount of time. (For PNG exports, I can achieve consistent placements by adding them in via Pillow, but this won't help for HTML-based charts.)

Also, one somewhat-related question (which I'm happy to move to a separate issue if needed): Is there a way to ensure that an image will always be the same size, in pixels, as long as the width of the chart (in pixels) is always the same? It appears that, even when the sizex and sizey settings stay the same, the image size can vary. (Since these values are relative to the chart's area, though, this is probably to be expected. But being able to specify a fixed size, e.g. 300x200px, would be fantastic.)

Lenguaje dominante
JavaScript
Estrellas
18.3k
Forks
2k
Merge medio
2 d 10 h
PR fusionados (30 d)
30

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.

Más de plotly/plotly.js

Todos los issues de plotly/plotly.js

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.