1

I'm using VivaGraph to create a graph on my webpage as per some data. I used a websocket connection to receive the data(its an infinite data stream). I want to update my graph based on the data received but I'm not able to figure out how.

For example:

Suppose my graph currently that I can see on the screen is A----B The next date received says that now there's a node C that's linked to B and the link from A to B has been deleted. How do I do this on the same graph efficiently? That is: Now, I can see B----C

Thanks

4

1 回答 1

1

图可以在渲染后实时更新,没有任何问题或使用 graph.beginUpdate() 和 graph.endUpdate()。问题和错误似乎只存在于出现异常的情况下,例如添加已经存在的节点或删除不存在的链接。确保使用正常的 if 条件没有异常,并且图形将实时完美运行。

于 2013-07-04T09:14:27.500 回答