# C area chart 2

> MRR by plan — stacked areas with a total tooltip

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-area-chart-2).

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

## Install

```bash
npx shadcn@latest add https://shadcn.exchange/r/cnippet/c-area-chart-2.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/area-chart`, `@cnippet/chart-card`, `@cnippet/chart-utils`

## Files

### `registry/default/chart-variants/c-area-chart-2.tsx`

```tsx
"use client";

import { AreaChart } from "@/registry/default/charts/area-chart";
import { ChartCard } from "@/registry/default/charts/chart-card";
import { formatCurrency } from "@/registry/default/lib/chart-utils";

const data = [
  { enterprise: 14200, month: "Jan", pro: 21800, starter: 6400 },
  { enterprise: 15100, month: "Feb", pro: 23100, starter: 6900 },
  { enterprise: 16800, month: "Mar", pro: 24400, starter: 7300 },
  { enterprise: 17200, month: "Apr", pro: 26900, starter: 7100 },
  { enterprise: 19500, month: "May", pro: 28300, starter: 7800 },
  { enterprise: 21400, month: "Jun", pro: 30200, starter: 8200 },
];

export default function MrrByPlanStacked() {
  return (
    <ChartCard
      className="max-w-2xl"
      delta={0.073}
      description="Monthly recurring revenue by plan"
      title="MRR"
      value={formatCurrency(59800)}
    >
      <AreaChart
        categories={["starter", "pro", "enterprise"]}
        className="h-48"
        data={data}
        fill="solid"
        index="month"
        type="stacked"
        valueFormatter={formatCurrency}
      />
    </ChartCard>
  );
}
```
