When to use a waterfall chart
Waterfall (bridge) charts explain how you got from one number to another.
- MRR bridge: new, expansion, contraction, churn
- Profit and loss from revenue to net income
- Budget vs. actual variance
Data format
- Use 2 columns: Step,Change. The first row is the starting total.
- Every later row is a change: positive for increases, negative for decreases.
- A final Total bar is added for you (you can turn it off).
- Paste CSV, JSON from your API, TSV copied from Excel or Google Sheets, or a Markdown table. The generated component keeps your column names as its data keys.
Step,Change
Starting MRR,42000
New business,8600
Expansion,3200
Contraction,-1400
Churn,-2900[
{"step": "Starting MRR", "change": 42000},
{"step": "New business", "change": 8600},
{"step": "Expansion", "change": 3200},
…
]Options
- Total bar
- Append a final bar with the ending total.
- Values
- Label each bar with its signed change or total.
- Colors
- Separate colors for increases, decreases, and totals.
How to add it to your project
- 1. Add the shadcn/ui chart component (it installs Recharts):
npx shadcn@latest add chart - 2. Paste your data above, pick the options, and copy the generated
chart.tsx. - 3. Save it in your project (e.g.
components/waterfall-chart.tsx) and render<Chart />, or<Chart data={rows} />in Data as prop mode.
Waterfall Chart FAQ
Use floating bars: give each <Bar> a [low, high] range computed from the running total. ChartCN generates that calculation plus colors, labels, and a tooltip.
Yes. Bars span the actual range, even across zero, and a zero reference line appears when needed.
Yes. The steps are computed inside the component, so with Data as prop you pass raw Step/Change rows and it builds the waterfall itself.