# C gauge chart 3

> NPS — a -100 to 100 scale with four 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-3).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/c-gauge-chart-3
- Screenshot: https://shadcn.exchange/shot/cnippet/c-gauge-chart-3/light.png
- Registry item: https://ui.cnippet.dev/r/c-gauge-chart-3.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-3.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-3.tsx`

```tsx
"use client";

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

// Net Promoter Score runs from -100 to 100.
const bands = [
  { color: "var(--destructive)", label: "Needs work", to: 0 },
  { color: "var(--warning)", label: "Good", to: 30 },
  { color: "var(--success)", label: "Great", to: 70 },
  { color: "var(--info)", label: "Excellent", to: 100 },
];

export default function NpsGauge() {
  return (
    <div className="w-full max-w-xs rounded-lg border bg-card p-5">
      <div className="font-medium text-sm">Net Promoter Score</div>
      <div className="text-muted-foreground text-xs">Q3, 1,284 responses</div>
      <GaugeChart
        aria-label="Net Promoter Score"
        bands={bands}
        className="mt-4"
        max={100}
        min={-100}
        value={47}
        valueFormatter={(value) => (value > 0 ? `+${value}` : String(value))}
      />
    </div>
  );
}
```
