# C bar chart 1

> Monthly revenue — single series in a chart card

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-bar-chart-1).

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

## Install

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

## Files

### `registry/default/chart-variants/c-bar-chart-1.tsx`

```tsx
"use client";

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

const data = [
  { month: "Jan", revenue: 41200 },
  { month: "Feb", revenue: 38900 },
  { month: "Mar", revenue: 45600 },
  { month: "Apr", revenue: 47100 },
  { month: "May", revenue: 52300 },
  { month: "Jun", revenue: 49800 },
  { month: "Jul", revenue: 55400 },
  { month: "Aug", revenue: 58900 },
];

export default function MonthlyRevenue() {
  return (
    <ChartCard
      className="max-w-2xl"
      delta={0.064}
      description="Net revenue per month, 2026"
      title="Revenue"
      value={formatCurrency(58900)}
    >
      <BarChart
        categories={["revenue"]}
        className="h-48"
        data={data}
        index="month"
        valueFormatter={formatCurrency}
      />
    </ChartCard>
  );
}
```
