Colorbar Orientation Change Causes Render Issue
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 18.3k
- Forks
- 2k
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 28
Beschreibung
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!
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie mit der verlinkten CodePen-Reproduktion und untersuchen Sie die plotly.react-Aufrufe, die die colorbar orientation zwischen 'v' und 'h' ändern. Bestätigen Sie das Verhalten bei aktivierter colorbar und überprüfen Sie anschließend, dass das Ändern der orientation ohne Beschriftungen der vorherigen orientation oder ein verzerrtes Layout gerendert wird, ohne den hide-and-show-Workaround.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100