SankeyMark<T> Class
Draws a Sankey diagram of the flows between nodes, with a row per link: the nodes are bars in columns whose heights are their values, and the links are bands whose widths are their values. The nodes take the colors of the palette of the theme, and a link takes the color of its source, unless the Mark<T>.Fill channel colors the links.
public sealed class SankeyMark<T> : Mark<T>Type parameters
T- The type of the rows: the links.
Remarks
The links must not form a cycle: drawing the plot throws an InvalidOperationException.
- Inheritance
Mark<T>SankeyMark<T>
Constructors
| Name | Description |
|---|---|
| SankeyMark(IEnumerable<T>, Func<T, object?>, Func<T, object?>, Func<T, object?>) | Initializes a new instance of the SankeyMark<T> class. |
SankeyMark(IEnumerable<T>, Func<T, object?>, Func<T, object?>, Func<T, object?>)
SankeyMark.csInitializes a new instance of the SankeyMark<T> class.
public SankeyMark(IEnumerable<T> data, Func<T, object?> source, Func<T, object?> target, Func<T, object?> value)Parameters
dataIEnumerable<T>- The rows: the links.
sourceFunc<T, object?>- The channel of the name of the node the link leaves.
targetFunc<T, object?>- The channel of the name of the node the link reaches.
valueFunc<T, object?>- The channel of the value of the link.
Properties
| Name | Description |
|---|---|
| Alignment | Gets or sets how the nodes are placed in columns. The default is SankeyAlignment.Justify. |
| LinkOpacity | Gets or sets the opacity of the links, from 0 to 1. The default is 0.4. |
| NodePadding | Gets or sets the space between the nodes of a column. The default is 10. |
| NodeWidth | Gets or sets the width of the nodes. The default is 15. |
| ShowLabels | Gets or sets a value that indicates whether the names of the nodes are drawn. The default is true. |
| Source | Gets the channel of the name of the node the link leaves. |
| Target | Gets the channel of the name of the node the link reaches. |
| Value | Gets the channel of the value of the link. |
Alignment
SankeyMark.csGets or sets how the nodes are placed in columns. The default is SankeyAlignment.Justify.
public SankeyAlignment Alignment { get; set; }Property value
LinkOpacity
SankeyMark.csNodePadding
SankeyMark.csNodeWidth
SankeyMark.csShowLabels
SankeyMark.csSource
SankeyMark.csGets the channel of the name of the node the link leaves.
Property value
Target
SankeyMark.csGets the channel of the name of the node the link reaches.
Property value
Value
SankeyMark.csGets the channel of the value of the link.