# C spark area 1

> KPI card — revenue with a 7-day spark area

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-spark-area-1).

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

## Install

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

## Files

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

```tsx
"use client";

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

const data = [
  { day: "Mon", revenue: 6120 },
  { day: "Tue", revenue: 6840 },
  { day: "Wed", revenue: 6510 },
  { day: "Thu", revenue: 7290 },
  { day: "Fri", revenue: 7980 },
  { day: "Sat", revenue: 7410 },
  { day: "Sun", revenue: 8360 },
];

export default function RevenueKpi() {
  return (
    <ChartCard
      className="max-w-xs"
      delta={0.091}
      description="Last 7 days"
      title="Revenue"
      value={formatCurrency(50510)}
    >
      <SparkArea
        categories={["revenue"]}
        className="h-14 w-full"
        data={data}
        index="day"
      />
    </ChartCard>
  );
}
```
