PointTuple
The center of the layout, default to the center of the graph
((d?: unknown) => number) | number | number[] | undefined Default:
10
The padding value inside the combo, which is not used for rendering, but only for calculating force. It is recommended to set it to the same value as the combo internal padding value on the view
Layout<any> Default:
ConcentricLayout
The layout algorithm inside the combo, which needs to use a synchronized layout algorithm, default to concentric
Example
import { ConcentricLayout } from '@antv/layout';innerLayout: new ConcentricLayout({sortBy: 'id',});
number | number[] | ((d?: Node) => number) Default:
10
The size of the node (diameter). Used for collision detection
If not specified, it will be calculated based on the size attribute of the incoming node. If neither is specified, the default size is 10
Layout<any> Default:
ForceLayout
The outermost layout algorithm, default to force
Example
import { ForceLayout } from '@antv/layout';outerLayout: new ForceLayout({gravity: 1,factor: 2,linkDistance: (edge: any, source: any, target: any) => {const nodeSize = ((source.size?.[0] || 30) + (target.size?.[0] || 30)) / 2;return Math.min(nodeSize * 1.5, 700);},});
number | ((d?: Node) => number)
It takes effect when preventNodeOverlap or preventOverlap is true. The minimum spacing between nodes when overlapping is prevented. It can be a callback function, and different minimum spacing can be set for different nodes
string
treeKey