Skip to content

Type Alias: SankeyTrace ​

ts
type SankeyTrace = Omit<CommonTraceAttributes, 'hoverinfo'> & DomainTraceAttributes & object;

Sankey diagram: nodes in columns sized by their flow and links between them as wide as their value; cycles are drawn as loops; drag nodes to rearrange.

Type Declaration ​

NameTypeDescription
arrangement?"snap" | "perpendicular" | "freeform" | "fixed"Node dragging. 'snap': a node moves freely while dragged, the other nodes of its column make room, and it snaps back to its column when released. 'perpendicular': across the flow only. 'freeform': anywhere. 'fixed': nodes do not move. A drop restyles node.x / node.y of every node. Default: 'freeform' when node.x and node.y are given, else 'snap'.
hoverinfo?"all" | "none" | "skip"Hover of nodes and links: labels ('all'), highlighting without labels ('none') or no hover at all ('skip'). The default of node.hoverinfo and link.hoverinfo.
link?SankeyTraceLinkThe links.
node?SankeyTraceNodeThe nodes.
orientation?"v" | "h"Flow direction: left to right ('h') or top to bottom ('v', the whole diagram transposed).
textfont?SankeyTraceTextfontFont of the node labels. Default: layout.font, with the automatic halo (shadow: auto).
type"sankey"Trace type.
valueformat?stringd3-format of the node and link values in hover labels (%{value}).
valuesuffix?stringText after the values in hover labels (a unit such as TWh).

Released under the MIT License.