Share Download code Jump to the code Open in the playground

Force layout

New general-purpose force-directed layout. charge defines the strength with which the nodes repel each other. gravity stands for the global force, pulling the graph to its mass center. elasticity defines how the nodes collide with each other.