Ir al contenido

ForceDirectedLayoutOptions

Defined in: layout/ForceDirectedLayout.ts:10

Options for force-directed layout.

optional center?: boolean

Defined in: layout/Layout.ts:17

Whether to center the layout. Default: true

LayoutOptions.center


optional convergenceThreshold?: number

Defined in: layout/ForceDirectedLayout.ts:18

Convergence threshold. Default: 0.01


optional defaultLinkDistance?: number

Defined in: layout/ForceDirectedLayout.ts:14

Default link distance. Default: 150


optional defaultNodeSeparation?: number

Defined in: layout/ForceDirectedLayout.ts:12

Default node separation. Default: 100


optional direction?: "horizontal" | "vertical"

Defined in: layout/Layout.ts:15

Whether to arrange in a specific direction. Default: ‘vertical’

LayoutOptions.direction


optional maxIterations?: number

Defined in: layout/ForceDirectedLayout.ts:16

Iteration limit. Default: 300


optional padding?: number

Defined in: layout/Layout.ts:13

Border padding. Default: 20

LayoutOptions.padding


optional spacing?: number

Defined in: layout/Layout.ts:11

Spacing between nodes. Default: 50

LayoutOptions.spacing


optional theta?: number

Defined in: layout/ForceDirectedLayout.ts:27

Barnes-Hut approximation ratio for the repulsion simulation (size of a region divided by its distance to the node being pushed — below this, the whole region is treated as one aggregate point instead of recursing into it). Smaller is more accurate but slower; 0 would disable the approximation entirely (falling back to exact all-pairs repulsion). Default: 0.9