-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
undefined being thrown while redrawing with plotly_selecting #2643
Comments
I suspect it's this: plotly.js/src/plot_api/plot_api.js Lines 139 to 145 in fb75158
Are you adding/deleting traces to the same plot that the selection is happening on? I guess we're rejecting here because the plot hasn't actually redrawn yet, so if you expected to be able to do something like look at |
Yes, I'm adding/removing to the same chart that's being dragged on, so as to colour them. Maybe I should restyle? I should add that the error message is kinda gross, throwing |
I see. +1 to rejecting with a string if possible! I should note that this does work, it just also throws while it's working so maybe I could have the thing wait to redraw until it's done redrawing? Re |
The problem is not that it's in the middle of redrawing, it's that it's in the middle of dragging, and we defer redraws until you're done dragging. This is for like streaming data, we stop redrawing the stream while you drag (to select, zoom, pan, whatever). Maybe we shouldn't do that, we should allow redraws mid-drag, but that's a substantially bigger development effort.
Couldn't you have one trace that's "selected elsewhere" and another trace that's "deselected elsewhere", and then use |
Ah I see! |
Merged into #3305 |
Crossfiltering works great with
plotly_selecting
except that I had to add somecatch(function(){})
to suppress errors I was seeing. https://github.com/plotly/plotly.js-crossfilter.js/commit/c48b5beaf1eafbb4c5f68a1923084607c61591c5Would be great to not have to catch-and-drop
undefined
.here's the error I was seeing, sorry for the minification:
The text was updated successfully, but these errors were encountered: