Skip to content

seedPositions

seedPositions(graph, width, height, opts?): void

Defined in: network/force.ts:498

Seed node positions deterministically as a phyllotaxis (“sunflower”) disc centred on the viewport — a good, reproducible starting distribution for ForceLayout when a graph arrives without coordinates (no two nodes coincident, no RNG). Without opts the disc fills the viewport (radius min(width, height) / 2); with opts it is sized to the force model’s equilibrium (see SeedOptions.force).

LayoutGraph

number

number

SeedOptions

void