# C combo chart 1

> Revenue & growth — bars in $ with a % line on a second axis

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

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

## Install

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

## Files

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

```tsx
"use client";

import { ChartCard } from "@/registry/default/charts/chart-card";
import { ComboChart } from "@/registry/default/charts/combo-chart";
import {
  formatCurrency,
  formatPercent,
} from "@/registry/default/lib/chart-utils";

// Growth is month-over-month change in revenue.
const data = [
  { growth: 0.021, month: "Jan", revenue: 41200 },
  { growth: -0.056, month: "Feb", revenue: 38900 },
  { growth: 0.172, month: "Mar", revenue: 45600 },
  { growth: 0.033, month: "Apr", revenue: 47100 },
  { growth: 0.11, month: "May", revenue: 52300 },
  { growth: -0.048, month: "Jun", revenue: 49800 },
  { growth: 0.112, month: "Jul", revenue: 55400 },
  { growth: 0.063, month: "Aug", revenue: 58900 },
];

export default function RevenueAndGrowth() {
  return (
    <ChartCard
      className="max-w-2xl"
      description="Monthly revenue with month-over-month growth"
      title="Revenue & growth"
    >
      <ComboChart
        barCategories={["revenue"]}
        className="h-48"
        config={{ growth: { label: "MoM growth" } }}
        data={data}
        dualAxis
        index="month"
        lineCategories={["growth"]}
        lineValueFormatter={(value) => formatPercent(value, { digits: 0 })}
        valueFormatter={formatCurrency}
      />
    </ChartCard>
  );
}
```
