Skip to content

Interface: SankeyTraceNode ​

The nodes.

Properties ​

PropertyTypeDefault valueDescription
align?"left" | "center" | "right" | "justify""justify"Column of nodes: by depth from the sources, sinks in the last column ('justify'); by depth ('left'); by height from the sinks ('right'); or by depth with sources next to their first target ('center').
color?PerPointColorundefinedNode color, or one per node index. Default: the colorway, one color per node at 0.8 opacity.
customdata?DataColumnundefinedExtra data per node for %{customdata} and events.
groups?readonly readonly number[][][]Groups of node indices, each drawn as one combined node: links between members of a group are dropped, links to and from members attach to the group.
hoverinfo?"none" | "all" | "skip""all"Hover of the nodes: labels ('all'), highlighting without labels ('none') or no hover and no events ('skip'). Default: the trace hoverinfo.
hovertemplate?stringundefinedTemplate of the node hover labels: %{label}, %{value} (formatted with valueformat and valuesuffix), %{customdata}, %{color}, %{targetLinks.length} (incoming links), %{sourceLinks.length}, … <extra>…</extra> replaces the value box.
label?DataColumnundefinedNode labels, one per node index (Plotly pseudo-HTML allowed). A group made by node.groups takes the label after the last node referenced by a link.
line?SankeyTraceNodeLineundefinedOutlines of the nodes.
pad?number20Space between the nodes of a column in CSS px (reduced when the column would not fit). Minimum: 0
thickness?number20Node thickness along the flow direction, in CSS px. Minimum: 1
x?DataColumnundefinedFixed node positions along the flow: the node center as a fraction of the domain (0 left, 1 right; top to bottom when vertical). Used with node.y; a position of 0 or a missing one leaves the node where the layout puts it (Plotly).
y?DataColumnundefinedFixed node positions across the flow: the node center as a fraction of the domain (0 top, 1 bottom; left to right when vertical). Used with node.x.

Released under the MIT License.