Colorbar Orientation Change Causes Render Issue
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 18.3k
- Fork
- 2k
- Merge medio
- 2g 12h
- PR unite (30g)
- 28
Descrizione
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!
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con la riproduzione CodePen collegata e analizza le chiamate a plotly.react che modificano la colorbar orientation tra 'v' e 'h'. Conferma il comportamento con la colorbar abilitata, quindi verifica che la modifica della orientation venga renderizzata senza le etichette della orientation precedente né un layout distorto, senza il workaround hide-and-show.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- data-visualization
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100