This function creates a configuration list for G6 D3 Force layout with all available options as parameters.
Arguments
- link
A list specifying force parameters for links (edges), with components:
- id
Edge id generation function, format:
function(edge, index, edges) { return string }
. Default isfunction(e) e.id
- distance
Ideal edge length that edges will tend toward. Can be a number or a function
function(edge, index, edges) { return number }
. Default is 30- strength
The strength of the force. Higher values make edge lengths closer to the ideal length. Can be a number or a function
function(edge, index, edges) { return number }
. Default is 1- iterations
Number of iterations of link force. Default is 1
- collide
A list specifying collision force parameters for nodes, with components:
- radius
Collision radius. Nodes closer than this distance will experience a repulsive force. Can be a number or a function
function(node, index, nodes) { return number }
. Default is 10- strength
The strength of the repulsive force. Higher values produce more obvious repulsion. Default is 1
- iterations
The number of iterations for collision detection. Default is 1
- ...
Additional parameters to pass to the layout. See https://g6.antv.antgroup.com/manual/layout/build-in/d3-force.