Table of Contents

Class BOBSankeyChart<TY>

Namespace
BlazOrbit.Charts.Components
Assembly
BlazOrbit.Charts.dll

Sankey flow diagram - visualises mass / energy / monetary movement between named nodes as variable-thickness ribbons. The chart auto-derives node columns from the edge graph (topological rank by reachability from sources) so consumers only describe the links; positions are computed.

public sealed class BOBSankeyChart<TY> : BOBChartBase<object, TY>, IDataVisualizationFamilyComponent

Type Parameters

TY

Numeric type of the link values.

Inheritance
object
ComponentBase
BOBChartBase<object, TY>
BOBSankeyChart<TY>
Implements
Inherited Members

Constructors

BOBSankeyChart()

public BOBSankeyChart()

Properties

AlignSinksRight

When true (default), nodes with no outgoing edges (sinks) are forced to the rightmost column so terminal nodes align. Set to false for funnel-like flows where drops should appear adjacent to the step where they occur.

[Parameter]
public bool AlignSinksRight { get; set; }

Property Value

bool

LabelFontSize

Font size of node labels in pixels. Default 12.

[Parameter]
public double LabelFontSize { get; set; }

Property Value

double

LinkOpacity

Opacity of link ribbons, 0–1. Default 0.5.

[Parameter]
public double LinkOpacity { get; set; }

Property Value

double

Flow edges between named source / target nodes.

[Parameter]
public IEnumerable<BOBChartSankeyLink<TY>>? Links { get; set; }

Property Value

IEnumerable<BOBChartSankeyLink<TY>>

NodeColors

Optional per-node colour overrides. Key = node label, value = any valid CSS colour. When a node is present in this dictionary its rectangle uses the supplied colour instead of the column palette.

[Parameter]
public IReadOnlyDictionary<string, string>? NodeColors { get; set; }

Property Value

IReadOnlyDictionary<string, string>

NodePadding

Vertical gap (pixels) between nodes in the same column. Default 12.

[Parameter]
public double NodePadding { get; set; }

Property Value

double

NodeWidth

Pixel width of each node's column rectangle. Default 16.

[Parameter]
public double NodeWidth { get; set; }

Property Value

double

OnLinkClick

Fired when the user clicks a link ribbon. Carries the link record so the consumer can drill into the underlying dataset.

[Parameter]
public EventCallback<BOBChartSankeyLink<TY>> OnLinkClick { get; set; }

Property Value

EventCallback<BOBChartSankeyLink<TY>>

OnNodeClick

Fired when the user clicks a node rectangle. Carries the node label so the consumer can pivot the view (filter, drill, etc.).

[Parameter]
public EventCallback<string> OnNodeClick { get; set; }

Property Value

EventCallback<string>

Padding

Pixel padding around the chart inside the SVG viewport. Default 16.

[Parameter]
public double Padding { get; set; }

Property Value

double

Methods

BuildAriaLabel()

Default ARIA label for the chart's <svg> root. Subclasses override to inject series / value summaries (improves screen-reader experience).

protected override string BuildAriaLabel()

Returns

string

RenderSvg(RenderTreeBuilder)

Concrete charts override this to emit SVG content. The supplied builder is positioned inside the <svg> root, so implementations only need to add geometry primitives (lines, paths, rects, text). Sequence numbers must remain unique within the override.

protected override void RenderSvg(RenderTreeBuilder builder)

Parameters

builder RenderTreeBuilder

Render tree builder positioned inside the SVG root.