Skip to main content

Function: computeSankeyLayout()

computeSankeyLayout(nodes, links, options): SankeyLayout

Defined in: src/mobjects/graph/sankeyLayout.ts:144

Compute a layered left-to-right Sankey layout in horizontal space.

The caller maps the result to the final orientation with orientPoint. Node lengths and link widths share one scale, so a link width is proportional to its value. A node with unequal in and out totals is sized by the larger of the two. The function never throws for empty, single, or unlinked input.

Parameters​

nodes​

SankeyNodeInput[]

SankeyLinkInput[]

options​

SankeyLayoutOptions

Returns​

SankeyLayout