# C bullet chart 2

> SLA vs target — response time per support tier

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-bullet-chart-2).

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

## Install

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

## Files

### `registry/default/chart-variants/c-bullet-chart-2.tsx`

```tsx
"use client";

import { BulletChart } from "@/registry/default/charts/bullet-chart";

// First-response time (hours) per support tier, against its SLA.
// Lower is better, so the bar turns red when it passes the target.
const tiers = [
  { actual: 0.6, name: "Enterprise", sla: 1 },
  { actual: 3.4, name: "Business", sla: 4 },
  { actual: 27, name: "Starter", sla: 24 },
];

export default function SlaVsTarget() {
  return (
    <div className="w-full max-w-md rounded-lg border bg-card p-5">
      <div className="font-medium text-sm">First response vs SLA</div>
      <ul className="mt-4 grid gap-5">
        {tiers.map((t) => {
          const breached = t.actual > t.sla;
          return (
            <li className="grid gap-1.5" key={t.name}>
              <div className="flex justify-between text-sm">
                <span>{t.name}</span>
                <span
                  className={
                    breached
                      ? "text-destructive-foreground tabular-nums"
                      : "text-muted-foreground tabular-nums"
                  }
                >
                  {t.actual}h / {t.sla}h SLA
                </span>
              </div>
              <BulletChart
                aria-label={`${t.name}: ${t.actual} hours, SLA ${t.sla} hours${breached ? ", breached" : ""}`}
                color={breached ? "var(--destructive)" : "var(--success)"}
                max={t.sla * 1.5}
                ranges={[t.sla, t.sla * 1.5]}
                target={t.sla}
                value={t.actual}
              />
            </li>
          );
        })}
      </ul>
    </div>
  );
}
```
