Replies: 1 comment 1 reply
-
@serg06 thanks for reaching out. Yes, that's easily doable. Please check the dynamic data changes example. Code is here. All you have to do is not recreate (or even clone) the objects that are meant to persist from one iteration to the next. The module knows how to recognise if a given object reference was already present so it won't be reset in a data change. It just needs to be the exact same object (by reference). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! This project has been super useful for rendering static graphs. Now we'd like to use it to render some dynamic graphs as well. E.g. when a user clicks on a node or an edge, we want to delete it. Unfortunately this causes the whole graph to reset and all of the nodes to reposition.
Is there any way to perform this mutation without recreating the graph?
FWIW d3 seems to support it: https://observablehq.com/@d3/modifying-a-force-directed-graph
Beta Was this translation helpful? Give feedback.
All reactions