Creating the figure with selectedpoints does not register those points to the SelectedData
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 24.4k
- Forks
- 2.3k
- Ø Merge
- 2 T. 7 Std.
- Gemergte PRs (30 T.)
- 13
Beschreibung
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)
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
Beginne mit dem Generic Crossfilter Recipe aus dem interaktiven Graphing-Beispiel und reproduziere den Callback mit einer Figure, die mit voreingestellten selectedpoints erstellt wurde. Untersuche, wie selectedData sowie dessen points und range behandelt werden, wenn die Figure erstellt wird. Erledigt ist dies, wenn selectedData die voreingestellte Auswahl widerspiegelt und der Callback die vorhandenen Filter nicht löscht.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- 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