Waterfall Chart
waterfall-chartHow a starting amount becomes a final one, on TanStack Charts: revenue bridged through new business and churn, a budget through its line items. Each change floats from where the last ended, gains and losses in their own hues, with a closing total.
import { WaterfallChart } from "@/components/forme/waterfall-chart/waterfall-chart";
// How monthly recurring revenue moved over the quarter, in thousands.
const bridge = [
{ step: "Jul", amount: 182 },
{ step: "New", amount: 34 },
{ step: "Upsell", amount: 18 },
{ step: "Downsell", amount: -9 },
{ step: "Churn", amount: -20 },
];
export function WaterfallChartDemo() {
return (
<div className="w-full rounded-xl border border-border bg-card p-5 lit edge">
<p className="text-caption-1-medium text-muted-foreground">MRR bridge, Q3</p>
<p className="mt-1 text-[1.75rem] leading-none font-semibold tracking-[-0.03em] tabular-nums">
+$23k
</p>
<WaterfallChart
className="mt-5"
label="Monthly recurring revenue from July to September, through new business, upsell, downsell and churn"
data={bridge}
index="step"
value="amount"
total="Sep"
formatValue={(value) => `$${value}k`}
/>
</div>
);
}Install
Adds the component, its registry dependencies, and the token stylesheet you import once.
API reference
Read from the source, so it is the API of the file you install. A prop marked * is required.
WaterfallChart
How a starting amount becomes a final one, step by step: revenue bridged through new business and churn, a budget through its line items.
| Prop | Type | Default | Description |
|---|---|---|---|
data* | readonly Row[] | — | The steps in order. The first is the starting amount; the rest are changes. |
index* | keyof Row & string | — | The field that names each step. |
value* | NumericKey<Row> | — | The amount: the start for the first row, a signed change for the rest. |
label* | string | — | Accessible name. Say what is being bridged from and to. |
total | string | — | A closing bar for the result, with this name. Omit to end on the last change. |
formatValue | (value: number) => string | plain | |
height | number | 280 | |
className | string | — |
Related


Chart
The tooltip and legend every Forme chart shares: a floating panel with a colour, a name and a right-aligned value per series, and a row of swatches. Installed with any chart; use them directly to give a chart of your own the same finish.
data display

Composed Chart
Columns and a line on one axis, on TanStack Charts: volume against its target, actuals against the plan. Rounded columns side by side, the line drawn over them, and a band cursor that lists every series in the column.
data display

Heatmap Chart
A grid of cells whose colour carries a quantity, on TanStack Charts: activity by weekday and hour, scores by team and quarter. Six steps of one hue from the sunken surface to the chart accent, optional values in the cells, and a tooltip on every cell.
data display