plotly / plotly/plotly.js

Colorbar Orientation Change Causes Render Issue

Ouverte
#6,973 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

bug good for agent P3
Langage dominant
JavaScript
Étoiles
18.3k
Forks
2k
Merge moyen
2 j 12 h
PR mergées (30 j)
28

Description

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!

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par la reproduction CodePen liée et examinez les appels à plotly.react qui modifient la colorbar orientation entre 'v' et 'h'. Confirmez le comportement avec la colorbar activée, puis vérifiez que la modification de la orientation est rendue sans les libellés de l'orientation précédente ni une mise en page déformée, sans le contournement hide-and-show.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript
Domaine
data-visualization
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.