-
-
Notifications
You must be signed in to change notification settings - Fork 144
ability to preserve user interaction state between redraws #198
Comments
+1 from the Much like my comment in #1849 I think this could/should be a flag to OTOH I could also see an argument for saying "no, do this at the upper level, in Dash or in |
We talked about this today and it looks like @alexcjohnson has a way forward |
For the record, here's what I'm implementing:
My question right now is what to call this attribute? A few things come to mind but I'm not super excited about any of them: |
Interesting proposal. But if a user only wants to keep a "few" changes coming from user interactions? For example, keep the updated axis ranges, but not the legend visibilities. |
This new attribute has some similarities with
|
I can see a lot of cool use cases for this, let's do it! We could add copies of the same attribute to specific containers, that would inherit from the base layout attribute. So There are also |
(cc @plotly/dash as well) |
I vote 👍 for
This sounds interesting, but maybe we'll need to make it even more granular.
So Moreover, what about "ui" changes made though updatemenus (e.g. https://codepen.io/etpinard/pen/pbxkNb) or layout sliders? Should these be allowed to persist? |
Oh, I forgot that we have a So yeah, we can have
As mentioned above, I think spikes belong with Similarly, for trace visibility - I'm starting to think that instead of (or at least intermediate to) putting a Trying to figure out what happens if you add/remove (non-pie) traces and yet want visibility to persist. It works fine if the alterations are at the end of
That seems like a can of worms, and I doubt anyone interested in this feature would be using updatemenus or sliders, they'd be using an off-plot control that does the same thing. So my gut reaction is no, don't persist these. What about |
all sound great 🏆
Yeah, that's what I'm thinking to. I just wanted to make we weren't missing anything.
Good point here. Yes, those should be able to persist. Maybe we could group them together as |
Another edge case to consider would be selected points: ability to persist selections through updates. For now, that'd just mean the points/bars but in the feature that might include the actual rectangle (plotly/plotly.js#1851) |
Alright, seems like we all agree on the general framework, but some of these specifics we'll need to figure out one by one. For example I'm not sure all the edits should be controlled by the same revision id, perhaps moving an annotation on a certain axis should be controlled by the revision of that axis? Or maybe that's too complicated... anyway I'll see how it's working and we can discuss further in a PR. |
So the main use-case I see is actually people wanting things to be preserved in general and not actually resetting them all that often, although obviously the ability to do is important. Under the current proposal, this would be accomplished by simply setting |
Yep @nicolaskruchten, both of those would work as you're describing. |
Cool. Could they just set Maybe |
Yes, just like
|
👍
👍 |
Completed in plotly/plotly.js#3236, set to be released in plotly.js@1.43.0 |
discussion taken from here: https://community.plot.ly/t/preserve-trace-visibility-in-callback/5118/5
The text was updated successfully, but these errors were encountered: