# V chart 1

> Multi-Series Bar Chart

A shadcn/ui block from the [@cnippet](https://ui.cnippet.dev/) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/cnippet/v-chart-1).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/v-chart-1
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/cnippet/v-chart-1-light-76ce765ebc3e511b.png
- Registry item: https://ui.cnippet.dev/r/v-chart-1.json
- Categories: chart
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.cnippet.dev/r/v-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/chart`

## Files

### `registry/default/variants/v-chart-1.tsx`

```tsx
"use client";

import { Bar, BarChart } from "recharts";

import { type ChartConfig, ChartContainer } from "@/registry/default/ui/chart";

const chartData = [
  { desktop: 186, mobile: 80, month: "January" },
  { desktop: 305, mobile: 200, month: "February" },
  { desktop: 237, mobile: 120, month: "March" },
  { desktop: 73, mobile: 190, month: "April" },
  { desktop: 209, mobile: 130, month: "May" },
  { desktop: 214, mobile: 140, month: "June" },
];

const chartConfig = {
  desktop: {
    color: "#2563eb",
    label: "Desktop",
  },
  mobile: {
    color: "#60a5fa",
    label: "Mobile",
  },
} satisfies ChartConfig;

export function ChartExample() {
  return (
    <ChartContainer className="min-h-50 w-full" config={chartConfig}>
      <BarChart accessibilityLayer data={chartData}>
        <Bar dataKey="desktop" fill="var(--color-desktop)" radius={4} />
        <Bar dataKey="mobile" fill="var(--color-mobile)" radius={4} />
      </BarChart>
    </ChartContainer>
  );
}
```
