Creating the figure with selectedpoints does not register those points to the SelectedData
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 24.4k
- Fork
- 2.3k
- Merge medio
- 2g 7h
- PR unite (30g)
- 13
Descrizione
Thank you so much for helping improve the quality of Dash!
We do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.
Describe your context
Please provide us your environment, so we can easily reproduce the issue.
python version: 3.8.10
- replace the result of
pip list | grep dashbelow
dash 2.7.0
dash-core-components 2.0.0
dash-html-components 2.0.0
dash-renderer Not installed
dash-table 5.0.0
-
if frontend related, tell us your Browser, Version, and OS
- OS: Windows 64-bit operating system
- Browser: Chrome, (pretty sure its the same for every browser its an internal issue)
- Version: 107.0.5304.88
Describe the bug
When creating a new figure with a preset selectedpoints,
The selectedData of the figure doesn't get updated and remains empty.
You can see this bug when running the example from https://dash.plotly.com/interactive-graphing Generic Crossfilter Recipe
First, we get an error when we select data because we check if selectedpoints_local exists, and then if the range exists,
the problem is that my guess is in the new versions of dash, selectedData property return a dictionary with {'points':[ ]},
which means it's not empty but the points list is.
if we check if the points list is empty before getting the range, we don't get an error.
But because the selectedData of the newly created figure is empty the second it's created the callback is called again with empty selectedData and removes all of our filters.
Expected behavior
I guess the expected behavior would be that the selectedData will be updated based on the data from the newly created figure
(which means the points, range, and maybe more stuff I don't know about)
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 il Generic Crossfilter Recipe dell’esempio di grafici interattivi e riproduci il callback con una figura creata usando selectedpoints preimpostati. Esamina come vengono gestiti selectedData e i relativi points e range quando viene creata la figura. Il lavoro è completato quando selectedData riflette la selezione preimpostata e il callback non cancella i filtri esistenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- 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