Plotly `selected` event infinity loop when using selection 'handles'
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 18.3k
- Fork
- 2k
- Merge medio
- 2g 12h
- PR unite (30g)
- 28
Descrizione
Problem description:
It seems that when selecting data, having the data or layout change dynamically (using restyle or relayout respectively) and then selecting additional data (by moving the 'handles') the event handler then goes into an infinite loop.
Likely, the relayout due to the reselect causes a reselect which causes a relayout which causes a reselect, etc. etc.
Plotly v2.13+ goes into infinite loop when selecting additional data using the 'handles'.
Notice how the 'handles' do not reappear after moving one at the end of gif (has gone into infinite loop):

Plotly below v2.13 has no issues because it is not possible to reselect data using the 'handles':

Minimum working example: MWE
Taken from the example documentation for select-event
Note that this is a problem for Plotly v2.13+, the original example uses v1.58 (as illustrated on that page) which doesn't seem to have the problem (because the selection 'handles' to select data in the plot are not implemented prior to v2.13)
So this seems to be a regression of some kind.
Steps to reproduce:
- Run provided MWE
- Using lasso select (or other select tool) select some data (first time should not give any problems)
- When using Plotly v2.13+, in the selected data use the 'handles' to select additional data points
- Plotly now enters an infinite loop
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 eseguendo la MWE fornita e confrontando il comportamento di v2.13+ con l’esempio della documentazione di select-event. Traccia il flusso dell’handle di selezione attivato dopo restyle o relayout e considera l’issue risolta quando lo spostamento di un handle non causa più un loop infinito e gli handle ricompaiono normalmente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- data-visualization
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100