Skip to content
Launch price: Pro is $79 once →
ChartslibraryUI
By Killian Helf · Updated 2026-11-29

shadcn Waterfall Chart: Options, Pitfalls and How to Install One

The shadcn/ui charts don't include a waterfall (bridge) chart, and neither does Recharts underneath them. Several shadcn registries now publish waterfall blocks, so the question is less "is there one" than "will it hold up with real finance data". This guide gives the checklist to judge any waterfall chart against, then shows how to install ours with the shadcn CLI.

What a waterfall chart is for

A waterfall walks from one total to another: plan to actual, last year to this year, revenue to operating income. Each bar in between is a driver that adds or subtracts. Finance teams use it to answer one question: what made the number move?

The checklist

Test any waterfall component against these before you ship it to a finance team:

  1. It crosses zero correctly. Make a step take the running total below zero. Many Recharts-based waterfalls use a transparent stacked bar that breaks in this case. See why the transparent-bar trick breaks below zero.
  2. Subtotals are computed. "Gross profit" or "Actual" should come from the steps, not from a typed number. If you can pass a subtotal, the chart should warn when it doesn't match.
  3. Colors follow business meaning. In a cost bridge, a decrease is good. A component that colors by sign only will show savings in red.
  4. Connectors. Thin lines from the end of one bar to the start of the next make the bridge readable.
  5. The tooltip shows the step, not the plumbing. No invisible "base" series in the tooltip.
  6. Labels and a table. Readers need the exact value of each step, and finance teams will ask for the numbers behind the chart.

Install one with the shadcn CLI

ChartslibraryUI's waterfall chart passes all six. It's part of Pro, installed from your Pro download:

npx chartslibraryui add waterfall-chart --from ./chartslibraryui-pro

The free charts install straight from the registry with npx shadcn@latest add https://chartslibraryui.com/r/<chart>.json, and Pro charts share the same core and theme, so they sit together in components/charts/.

The data is an ordered list of steps:

[
  { label: "Plan", value: 8.2e6, kind: "total" },
  { label: "Volume", value: 640000 },
  { label: "Price", value: -210000 },
  { label: "Actual", kind: "subtotal" },
]

kind: "subtotal" is computed from the steps before it, so the arithmetic always closes. Set favorable="down" for cost bridges.

Keep bridges readable

  • About 10 steps at most. Group small drivers into "Other".
  • Start with a total. A bridge with no starting bar has nothing to walk from.
  • Don't let totals dwarf the steps. If the totals are 50 times larger than the steps, the steps become slivers. Start the axis at a meaningful baseline only if you label it clearly, or show the steps on their own with a variance chart.
  • Steps over time are a different chart. If the drivers are months rather than causes, use a variance trend chart.

Try the free charts in your app

26 charts, MIT, one command each.