Pregunta

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

¿Fue útil?

Solución

The graph can be updated in real time after rendering without any problems or using graph.beginUpdate() and graph.endUpdate(). The problem and the errors seem to lie only in cases where an exception is risen, such as adding a node that already exists or removing a link that doesn't. Make sure that there are no exceptions using normal if conditions and the graph will work perfectly in real time.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top