Yogesh Jangra
Yogesh Jangra

Reputation: 66

Dynamically place nodes in cytoscape.js based on values, avoiding overlaps

enter image description hereI am generating 1st level graph from dynamic values. When any node is clicked, it creates new nodes and place them based on the priority (max. value will be closer to clicked node). How can I place them without overlapping?

Upvotes: 1

Views: 818

Answers (1)

maxkfranz
maxkfranz

Reputation: 12242

(1) Place nodes manually using node.position(), noting bounding boxes to fix overlap.

or

(2) Use one of the layouts on a subset of the graph (i.e. the nodes of interest).

Upvotes: 1

Related Questions