Autoexpand does not work for axes
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 18.3k
- Forks
- 2k
- Merge medio
- 2 d 12 h
- PR fusionados (30 d)
- 28
Descripción
Seems like autoexpand does not work (or I do something wrong). In the example below, I increased y axis tick label size and font size, so they consume much more space, but margins are not adjusted, and labels are partially hidden outside of the chart container.
Reproduction
https://codepen.io/shadow-identity/pen/abeQprO
This is slightly modified example from the documentation: https://plotly.com/javascript/line-and-scatter/#line-and-scatter-plot
What is modified:
- y axis tick values increased to have more symbols
- y axis tick font size increased
- I also tested it with explicitly set
margin: {autoexpand: true}, but it does not change anything
Expected results
Grid size should be reduced (margin should be added to the left) to keep y axis ticks visible
Actual results
Y axis ticks are partially hidden
Environment
Chrome 130, Firefox 133 beta
Plotly from https://cdn.plot.ly/plotly-2.35.2.min.js
Additional info
At the same time, legend seems to increase corresponding margin. I increased the name length of one of the series to check if it will expand the margin, and it works.
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 la reproducción en CodePen y compárala con el ejemplo enlazado de la documentación de Plotly de líneas y dispersión usando Plotly 2.35.2. Comprueba por qué unas etiquetas ampliadas del eje y no provocan la expansión del margen izquierdo, mientras que la leyenda más larga sí lo hace; se considera terminado cuando las etiquetas del eje y permanecen completamente visibles sin establecer manualmente el margen.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- data-visualization
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 42/100