react-graph-vis
react-graph-vis copied to clipboard
Nodes do not update correctly (edges do)
Hi, when clicking on a node, I would like to change the color and background properties of the clicked nodes and neighbours (including connecting edges)
The nodes change properties correctly, while the nodes do not seem to change, unless I redraw the canvas.
Any ideas on why that's the case? Workarounds, suggestions, etc?
Hi, I'm facing the same problem. In my case, when I add or remove nodes, the graph updates without any problem. But when I'm changing properties of an exiting node (e.g. it's label or value), the graph remains same.
A quick update. When I manually call setData() method, the graph gets updated.
I confirm that setData() works, but it redraws the graph, which is a thing I would like to avoid. any updates?
What's worse is that setData() doesn't REALLY work because of #22 - the zoom and pan get reset, which is hardly ideal behaviour.
hi guys how to do manually call set data?
render a component like this: <Graph getNetwork={network => this.setState({ network })} graph={graphData} options={options} events={events} />
then in your methods, add const {network} = this.state; network.setData(nodesEdges);
Hi! Facing the same issue and am curious of you have ever found a good solution here?
I confirm that setData() works, but it redraws the graph, which is a thing I would like to avoid. any updates?