plotly / plotly/react-plotly.js
Coloraxis not properly updated
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 1.1k
- Fork
- 138
- Merge medio
- 3g 2h
- PR unite (30g)
- 4
Descrizione
In this codepen example, I have a simple scatterplot with a single data point, and a "coloraxis" marker.
When the datapoint's marker is updated, the coloraxis is not properly updated. Specifically, when the datapoint marker color is incremented or decremented, the coloraxis does not rescale as you'd expect.
For example, when the chart is initialized, the datapoint's color is initialized to 5. The color axis values range from 4-6, as you'd expect:

The Data.color++ and Data.color-- buttons increment and decrement the datapoint's color value. But this results in the coloraxis expanding to encompass the datapoint's color value from previous renders. Here, I've incremented and decremented the color a bunch of times, and the color axis' values now range from 0-12:

If I force the component to unload and reload (by passing a new React key param to the <Plot/> each time render is called), the issue is fixed. (Also, if I download the plot as a PNG, that PNG looks correct.)
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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 l'esempio CodePen collegato e segui il percorso di aggiornamento di React Plot per le modifiche al colore del marker del datapoint. Usa ripetutamente i controlli Data.color++ e Data.color--; il lavoro è completato quando il coloraxis viene riscalato in base al valore corrente anziché ai valori dei render precedenti, mentre il PNG scaricato rimane corretto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, react
- Ambito
- data-visualization, frontend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100