Skip to content

@eightkk/vue-weave / core / layoutForceGraph

Function: layoutForceGraph() ​

layoutForceGraph(nodes, edges, options?): GraphLayout

Defined in: src/core/graphForce.ts:477

Deterministic force-directed layout: link springs, Barnes–Hut repulsion and gravity, followed by box-overlap passes. Connected components without pinned nodes are laid out separately and packed in rows; components containing a pinned node share the caller's coordinate frame. Box rank is the breadth-first depth (ignoring edge direction) from the first node of its component in input order.

Parameters ​

nodes ​

readonly IdentifiedNode[]

edges ​

readonly GraphEdge<unknown>[]

options? ​

GraphForceLayoutOptions = {}

Returns ​

GraphLayout

Released under the MIT License.