Waterfall chart
A bridge from one total to another, with computed subtotals that always close.
Actual vs plan per line item: levels and variance side by side, coloured by business direction.
<VarianceChart />Variance chart is a Pro chart.
Installation is part of Pro
The full source is included in the Pro download. Get Pro to install it with the CLI and use it in unlimited projects.
Unlock with Pronpx chartslibraryui add variance-chart --from ./chartslibraryui-proUsage examples are part of Pro
Every example on this page comes with its code in the Pro download. The props and data shape below are public.
Unlock with ProRows with a label key, an actual key and a plan key; optional per-row favorable key.
[{ category: "Travel", amount: 22100, budget: 30000 }, ...]Missing values are null. Invalid values make the chart say what’s wrong instead of drawing a misleading picture. How charts handle bad data
Every chart also accepts the shared frame props: title, subtitle, source, height, mode, toolbar. Common API
export interface VarianceChartProps extends FrameProps {
data: Row[];
/** Key of the line item / market label. */
x: string;
actual: string;
/** Plan, budget, forecast or prior period. */
plan: string;
format?: FormatInput;
/** Is above plan good? Default "up". Can be a key in each row ("up"/"down"), for mixed revenue and cost lines. */
favorable?: Favorable | { key: string };
actualLabel?: string;
planLabel?: string;
/** Sort by absolute variance. Default false (keep the data order, e.g. P&L order). */
sortByVariance?: boolean;
}A bridge from one total to another, with computed subtotals that always close.
Positive and negative changes either side of zero, coloured by business direction.
KPIs, cumulative spend vs budget and variance by category in one block.