-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
API for deleting transforms and other new Plotly.js components #1069
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
Yes, this is a downside of the container array format. One small caveat here is what happens if something references, for example, |
As far as writing referencing code I don't see transforms any differently from traces or annotations. Plotlyjs supports deletion in both cases. We use UIDs in Plotly application code for exactly this reason. I imagine other application writers are accustomed to doing the same. It adds a layer of indirection (find the index that has a matching UID before making a Plotlyjs call) but it is expected when writing non-trivial applications. |
And for trivial cases like single run scripts I doubt deletion is used frequently. |
One possible approach: change |
Oh, wait. I'm confused then. Isn't the API the same for modifying annotations and transforms? Does |
There are specific lines of code for dealing with annotations that have not been replicated for transforms. There isn't a general array mutation pathway in relayout or restyle. |
Got it. I understand now. Thanks for clarifying. Those should be replicated; I'll just reiterate quickly my concern about having built a system that may actually include references to the array indices in other potentially-arbitrary places. (like an animation modifying |
We have an API for adding these things but there is no way to remove them yet.
cc @etpinard
The text was updated successfully, but these errors were encountered: