Creating the figure with selectedpoints does not register those points to the SelectedData
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Generic Crossfilter Recipe from the interactive graphing example and reproduce the callback with a figure created using preset selectedpoints. Inspect how selectedData and its points and range are handled when the figure is created. Done means selectedData reflects the preset selection and the callback does not clear the existing filters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100