apply-force-directed-layout
Description
apply-force-directed-layout
adaptor utilises force-directed graph layout algorithm to arrange the graph's nodes in two-dimensional space such that the edges are roughly equal in length and there is minimal overlap between them.
This is achieved by applying forces between the edges and nodes, which are determined by their spatial relationships.
Inputs
graph
Type: graph
Required: Yes
The graph structure.
stiffness
Type: number
Required: No
Defaults to 400.0.
repulsion
Type: number
Required: No
How much each node should node push each other away. If unspecified, defaults to 400.0.
damping
Type: number
Required: No
The amount to lessen the force to be applied. If unspecified, defaults to 0.5.
min energy threshold
Type: number
Required: No
The minimum amount of force that should be applied. If unspecified, defaults to null.
max speed
Type: number
Required: No
The maximum amount of speed that should be applied. If unspecified, defaults to null.
Outputs
graph
Type: graph
A force-directed graph drawing.
Examples
Example 1: Default behaviour.
Inputs:
graph
:
Outputs:
graph
:
Last updated