-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Include info from all multi-selection polygons in plotly_selected
event data
#5504
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
Comments
Nice to hear from you! This seems like a good solution :) |
@etpinard thanks very much for the note and opening the issue to reach 1K-issue milestone : ) Hope you are doing well and we can't wait to have your PR up! Whereas with selections I think one could add or remove point to/from selection; I was wondering how your |
@etpinard are you still planning on opening a PR for this? |
When trying to implement this, I realised things were trickier than expected. At first, I thought this ticket would "only" require us to write a version of this plotly.js/src/plots/cartesian/select.js Line 309 in 3f33829
with
So, if we choose to use
|
There might be cases to end up with multiple polygons too e.g. if one deselect areas from inside a selection. |
It seems to me that in cases of multiple selections, we should provide as much information as possible to downstream Dash devs:
|
Dear @etpinard, |
Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it 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. Thanks for your help - @gvwilson |
Hi, I hope all of you are doing well! I'm glad to see @archmoj's leading the v2 push 🚀
I'm currently rewriting an internal app using Dash.jl and I came across a situation where (I think) common dash callback logic could be greatly simplified with a small plotly.js tweak.
From https://jsbin.com/piveyuniso/edit?html,js,output, we can see that in the
plotly_selected
event data after a multi-selection interaction, therange.x
/range.y
coordinates (only!) correspond to the most recent selection.In situations where we need to consider all the selected regions (i.e. not just the most recent one), we need to accumulate the coordinates from the individual
plotly_selected
events. This is of course very much doable in dash, but also a little annoying.Probably the easiest and least-invasive solution would be to add a new
plotly_selected
event data field named e.g.rangeMulti
(andlassoPointsMulti
fordragmode: 'lasso'
) so that:Let me know if this solution makes sense! I can happily open a PR that implements it.
Cheers!
The text was updated successfully, but these errors were encountered: