本文へ移動

@eightkk/vue-weave / core / layoutLayeredGraph

Function: layoutLayeredGraph() ​

layoutLayeredGraph(nodes, edges, options?): GraphLayout

Defined in: src/core/graph.ts:287

Deterministic layered layout. Ranks come from the condensation of the strongly connected components, so every node of a cycle shares one rank: a large cycle becomes a single column (or row for TB and BT) whose length grows with the number of nodes, and the edges inside it use same-rank side routes. A 5,000-node cycle with the default sizes is about 214 by 410,000 units. Break or filter large cycles before layout (findGraphCycles finds them), or use layoutForceGraph, when that shape is not wanted.

Parameters ​

nodes ​

readonly IdentifiedNode[]

edges ​

readonly GraphEdge<unknown>[]

options? ​

GraphLayeredLayoutOptions = {}

Returns ​

GraphLayout

MIT ライセンスで公開しています。