WaterfallMark<T> Class

Draws a waterfall chart: each bar goes from the running total before its row to the running total after it, in the positive color of the theme for an increase and in its negative color for a decrease. A total row (WaterfallMark<T>.IsTotal) goes from zero to the running total, in the neutral color. Dashed lines join the bars.

public sealed class WaterfallMark<T> : Mark<T>

Type parameters

T
The type of the rows.
Inheritance
Mark<T> WaterfallMark<T>

Constructors

NameDescription
WaterfallMark(IEnumerable<T>, Func<T, object?>, Func<T, object?>)Initializes a new instance of the WaterfallMark<T> class.

WaterfallMark(IEnumerable<T>, Func<T, object?>, Func<T, object?>)

WaterfallMark.cs

Initializes a new instance of the WaterfallMark<T> class.

public WaterfallMark(IEnumerable<T> data, Func<T, object?> x, Func<T, object?> y)

Parameters

data IEnumerable<T>
The rows, in order.
x Func<T, object?>
The channel of the category of the bar.
y Func<T, object?>
The channel of the change. It is ignored for the total rows.

Properties

NameDescription
IsTotalGets or sets the function that tells whether a row is a total, or null for none.
XGets the channel of the category of the bar.
YGets the channel of the change.

Gets or sets the function that tells whether a row is a total, or null for none.

public Func<T, bool>? IsTotal { get; set; }

Property value

Func<T, bool>?

Gets the channel of the category of the bar.

public Func<T, object?> X { get; }

Property value

Func<T, object?>

Gets the channel of the change.

public Func<T, object?> Y { get; }

Property value

Func<T, object?>