Waterfall Chart

Displays how an initial value is affected by a series of positive and negative changes. Bars float to show the running total.

Basic Usage

<ArcadiaWaterfallChart TItem="WaterfallItem" Data="@data"
                     CategoryField="@(d => d.Category)"
                     ValueField="@(d => d.Amount)"
                     Height="400" Width="600" Title="Revenue Waterfall" />

@code {
    record WaterfallItem(string Category, double Amount);

    List<WaterfallItem> data = new()
    {
        new("Revenue", 500000),
        new("COGS", -180000),
        new("OpEx", -120000),
        new("Marketing", -65000),
        new("Tax", -40000),
    };
}

Parameters

ParameterTypeDefaultDescription
CategoryFieldFunc<T, string>requiredExtracts the category label
ValueFieldFunc<T, double>requiredExtracts the value (positive = increase, negative = decrease)
PositiveColorstring"var(--arcadia-color-success, #16a34a)"Color for positive (increase) bars
NegativeColorstring"var(--arcadia-color-danger, #dc2626)"Color for negative (decrease) bars
TotalColorstring"var(--arcadia-color-primary, #2563eb)"Color for total bars
ConnectorOpacitydouble0.2Opacity of the connector lines between waterfall bars (0.0 to 1.0)
ConnectorDashPatternstring"3,3"SVG stroke-dasharray pattern for connector lines between bars

Plus all shared ChartBase parameters.

Features

  • Automatic color coding: green for increases, red for decreases
  • Connector lines between bars showing the running total
  • Hover tooltips with value and running total
  • Responsive layout with the standard layout engine
  • PNG/SVG export via toolbar