Graph-Visualization
Graph-Visualization copied to clipboard
Is it possible to dynamically update such a graph?
Hi there,
Great project, I've been looking for this for years now. Thanks for writing this and making it available on github! I was wondering if it's possible to dynamically update the graph simply by updating the graph object.
- Josh
+1
+1
I adjusted the initial position of all nodes to be the same (center point) to get a cool explode-from-the-center effect. So, if you adjust the position of a node, everything should flow based on that. It did for me. All of the attractive, and repulsive, forces are still applied based on the new position(s) but I remember this not being super hard.
This wasn't so useful for dragging nodes around, since their corrective forces (mostly) pulled them back to whatever steady state I just adjusted them away from. It was useful for a cool initial condition.
Sorry if this is straight up wrong, or I'm taking credit for something I didn't do. I haven't worked on this code base in like four years, so my memory might not be that awesome. Hopefully this helps.
@brian-stinar Thanks for your comment. Where can we find the code you are talking about? Is it this commit: https://github.com/brian-stinar/Graph-Visualization/commit/9eaa7398815119dfde56bcaa6c554fd850eab353?
I think I will not be able to implemnt this feature due to lack of time but your code might help other contributers.
Yes, I think you can set those positions to whatever you want along time steps to dynamically position the nodes. This isn't super useful unless you disable the force calculations, since after forces are applied things will go back to (basically) where they were before.
I had fixed points in my representation, and at each time step I reassigned the position of these fixed points. There was some jitter due to floating point rounding, but this was how I accomplished fixed points.
Talking about this is sort of like remembering a dream, since it was so long ago.
Hopefully this helps someone. My modifications exposed positional data to incorporate this into other pieces of software, and it worked all right.
On Feb 15, 2018 11:51 AM, "David Piegza" [email protected] wrote:
@brian-stinar https://github.com/brian-stinar Thanks for your comment. Where can we find the code you are talking about? Is it this commit: brian-stinar/Graph-Visualization@9eaa739 https://github.com/brian-stinar/Graph-Visualization/commit/9eaa7398815119dfde56bcaa6c554fd850eab353 ?
I think I will not be able to implemnt this feature due to lack of time but your code might help other contributers.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/davidpiegza/Graph-Visualization/issues/1#issuecomment-366024907, or mute the thread https://github.com/notifications/unsubscribe-auth/AGMAZ5-nT41rrxYIc1Zm3QHt1-r3_SvWks5tVHy1gaJpZM4AMoOv .