Skip to content

Function: sankeyLayout()

ts
function sankeyLayout(
   nodes, 
   links, 
   opts?): SankeyLayoutResult;

Defined in: charts/sankey.ts:77

Pure, side-effect-free Sankey layout. Assigns each node a layer by longest path from the sources, stacks nodes vertically by throughput, and traces each link as a bezier ribbon between its source and target edges.

Parameters

ParameterType
nodesSankeyNode[]
linksSankeyLink[]
optsSankeyLayoutOptions

Returns

SankeyLayoutResult

MIT licensed. WebGL2 required.