Is there a way to add nodes and edges to Cytoscape graph with concentric layout? Cy.add() function adds the nodes and edges to the graph without the init styling. Only way I can this, is by building the graph everytime I add a new node or edge
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.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more