-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] relayoutData is not reset #905
Comments
Can you get what you want from I see your point, but I'm not sure we can solve it by resetting |
Good idea, I'll try it tomorrow. Edit: Just tried it, indeed the
That wasn't what I had in mind; I was hoping for the
If I understand this correctly, that would be (1) a way to tell Dash that "this data reflects this specific subset of a larger image" and (2) having some property similar to |
Dont clone figure.layout
Hi - we are tidying up stale issues and PRs in Plotly's public repositories so that we can focus on things that are most important to our community. If this issue is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. (Please note that we will give priority to reports that include a short reproducible example.) If you'd like to submit a PR, we'd be happy to prioritize a review, and if it's a request for tech support, please post in our community forum. Thank you - @gvwilson |
Context
Describe the bug
Display a large
Heatmap
(say, 2000x2000). Resample it so the displayed image is 100x100 by averaging each 20x20 region of the whole data.Define a callback that takes as input both the
relayoutData
and also some other input (say, someDropdown
controlling how to process the data for display - for example whether to use the average or minimum or maximum of each region).Use the mouse to select the bottom left quadrant of the image to zoom into it => The callback will be invoked and the
relayoutData
will describe the selected region (coordinates 0,0 -> 50,50) => The callback will compute a new 100x100 image by averaging each 10x10 region of the displayed selected 1000x1000 subset of the data.Again use the mouse to select the bottom left quadrant of the image to zoom into it => The callback will be invoked and the
relayoutData
will describe the selected region (coordinates 0,0 -> 50,50, same as before) => The callback must apply the selection to the current visible 1000x1000 region => The callback will compute a new 100x100 image by averaging each 5x5 region of the displayed selected 500x500 subset of the data.BUG:
relayoutData
will contain the exact same coordinates 0,0->50,50 even though the user did not select a sub-region to zoom into => The callback must not apply the selection to the currently visible region => The callback must reuse the 500x500 subset of the data to compute the correct 100x100 image to display.Expected behavior:
In step 5, the
relayoutData
should cover the whole visible region (coordinates 0,0->100,100), allowing the application to apply it to the currently visible region and get the right image to display.Workaround
If the callback is invoked twice with exactly the same selection, ignore the selection. This of course assumes that the user doesn't manually select the exact same sub-region of the visible heatmap (such as a specific quadrant) twice in a row.
The text was updated successfully, but these errors were encountered: