0
votes

How can I add nodes and edges to concentric layout dynamically? I am using cy.add() to add the nodes and edges every time I have new data. However it is not able to position the nodes in their respective level.

1

1 Answers

0
votes

When you add a node, it is positioned where you specify -- in the position field in its JSON.

If you don't want to manually specify a position, then run a layout. In your specific case, you should probably be running the concentric layout again with the same options.

Question is duplicate of How to dynamically add ndoes to cytoscape graph