# C gauge chart 1

> Web Vitals LCP — good / needs work / poor bands

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

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

## Install

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

## Files

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

```tsx
"use client";

import { GaugeChart } from "@/registry/default/charts/gauge-chart";

// Largest Contentful Paint thresholds from Core Web Vitals.
const bands = [
  { color: "var(--success)", label: "Good", to: 2.5 },
  { color: "var(--warning)", label: "Needs improvement", to: 4 },
  { color: "var(--destructive)", label: "Poor", to: 6 },
];

export default function WebVitalsLcp() {
  return (
    <div className="w-full max-w-xs rounded-lg border bg-card p-5">
      <div className="font-medium text-sm">Largest Contentful Paint</div>
      <div className="text-muted-foreground text-xs">p75, mobile, 28 days</div>
      <GaugeChart
        aria-label="Largest Contentful Paint"
        bands={bands}
        className="mt-4"
        label="LCP"
        max={6}
        value={2.1}
        valueFormatter={(value) => `${value.toFixed(1)} s`}
      />
    </div>
  );
}
```
