MAIDR Documentation - v4.4.0
    Preparing search index...

    Interface WaterfallStepConfig

    Configuration for waterfall charts. Optional when chartType is 'waterfall'.

    The single yKeys entry names each step's CONTRIBUTION, and the adapter accumulates the running totals MAIDR announces — a waterfall bar floats between the total before the step and the total after it, and neither number is in the data. This config only says which rows are not contributions: an opening balance, a subtotal, a closing balance.

    interface WaterfallStepConfig {
        totalKey?: string;
        totalIndices?: number[];
        kindKey?: string;
    }
    Index

    Properties

    totalKey?: string

    Key whose truthy value marks a row as restating the running total rather than changing it. Such a row sits on the baseline instead of floating, and a reader told a subtotal "rose by 950" would hear a contribution the chart never made.

    A restating row's own value becomes the new running total. When it has none, the accumulated total is used, so a "Closing" row need carry no number of its own.

    totalIndices?: number[]

    Indices of the restating rows, for data that carries no flag column. A waterfall usually opens and closes on one, so this is commonly [0, data.length - 1].

    kindKey?: string

    Key holding the step kind outright — 'increase', 'decrease' or 'total'. Takes precedence over both fields above; without any of the three, a step is read from the sign of its contribution.