Colorbar Orientation Change Causes Render Issue
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
Hello,
I was adding a control to one of my graphs in order to change the colorbar orientation from 'v' to 'h' and back again (user discretion) and noticed that it was having some strange behaviors.
Basically, it renders very strangely on change -- leaving the labels from the previous orientation and skewing things.
I did find that if I turn off the colorbar after changing orientation and turn it back on that it renders correctly.
So, I have created a workaround that onchange of orientation I hide the colorbar, do a plotly.react, then trigger a show of the colorbar and a second plotly.react.
I have demonstrated this in the following codepen: https://codepen.io/dritchie/pen/NWmOrZL
I commented out the 'fix', so both the weird behaviors and the correction can be shown.
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 la reproducción enlazada de CodePen e inspecciona las llamadas a plotly.react que cambian la colorbar orientation entre 'v' y 'h'. Confirma el comportamiento con la colorbar habilitada y verifica después que cambiar la orientation se renderiza sin etiquetas de la orientation anterior ni un diseño distorsionado, sin la solución alternativa de hide-and-show.
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
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100