# C waterfall chart 3

> Headcount change — hires and departures by team

A shadcn/ui block from the [@cnippet](https://ui.cnippet.dev/?utm_source=shadcn.exchange) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/cnippet/c-waterfall-chart-3).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/c-waterfall-chart-3
- Screenshot: https://shadcn.exchange/shot/cnippet/c-waterfall-chart-3/light.png
- Registry item: https://ui.cnippet.dev/r/c-waterfall-chart-3.json
- Categories: waterfall chart
- Listed: 2026-10-27, source last changed 2026-10-27

## Install

```bash
npx shadcn@latest add https://shadcn.exchange/r/cnippet/c-waterfall-chart-3.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `@cnippet/waterfall-chart`, `@cnippet/chart-card`

## Files

### `registry/default/chart-variants/c-waterfall-chart-3.tsx`

```tsx
"use client";

import { ChartCard } from "@/registry/default/charts/chart-card";
import { WaterfallChart } from "@/registry/default/charts/waterfall-chart";

const data = [
  { change: 142, team: "Jan 1" },
  { change: 6, team: "Eng" },
  { change: 3, team: "Sales" },
  { change: -2, team: "Support" },
  { change: 2, team: "Design" },
  { change: -4, team: "Ops" },
  { change: null, team: "Jun 30" },
];

export default function HeadcountChange() {
  return (
    <ChartCard
      className="max-w-2xl"
      description="Net hires and departures by team, H1 2026"
      footer="Engineering grew most; operations shrank after the vendor move."
      title="Headcount change"
      value="147"
    >
      <WaterfallChart
        category="change"
        className="h-52"
        config={{
          decrease: { label: "Net departures" },
          increase: { label: "Net hires" },
          total: { color: "var(--chart-3)", label: "Headcount" },
        }}
        data={data}
        index="team"
        totals={["Jan 1", "Jun 30"]}
        valueFormatter={(v) => String(v)}
      />
    </ChartCard>
  );
}
```
