Gauge Chart

A semicircle SVG gauge that fills to a value against a max and prints the percentage in the center. Exposed as an image with an accessible label for dashboards.

src/registry/ui/gauge-chart.tsx/r/gauge-chart.json

Installation#

bash
npx shadcn@latest add @minidev/gauge-chart

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/gauge-chart.json

Usage#

tsx
import { GaugeChart } from "@/components/ui/gauge-chart"

export function Example() {
  return (
    <GaugeChart value={78} label="Health" />
  )
}

API reference#

GaugeChart props
PropTypeDefault
value*number-
maxnumber100
labelstring"Gauge"
classNamestring-

* required

Examples#

All chart components