VivaGraphJS
VivaGraphJS copied to clipboard
g element not clearing
Hi, I'm making a dynamic visualization of a network topology and I'm using VivaGraphJS. So far it's been great. Now I'm having the issue that there are residual link line strokes in the
graph.clear() removes every single node and link in the graph. Do you see any errors in the console when you run it?
Nope, no errors when the function is run. All the clear function seems to do is stop isPinned from working, but the lines are still there.
I just encountered this. @mcpat1993 are you running this in React?
For my case, I realised that I was running graph.run() at every time data is loaded, resulting in duplicate elements although graph.clear() was run before loading. Solved this by placing graph.run() only at componentDidMount and clearing worked as expected.
I am not running this in React.
I actually moved over to Cytoscape for my visualization stuff. I don't recall whether or not I was doing that, unfortunately.