Skip to content
Time series & sequenceGenerated from the public API

GaugeChart

Place regimes, events and calendars on one time axis a reader can inspect.

@luc/ui/charts

What it shows

Show one current reading inside labelled ranges or against a target.

Live preview

One served reading inside labelled zones; the gauge draws the thresholds, it does not evaluate them.

Utilisation: 62%
<GaugeChart
  value={62}
  min={0}
  max={100}
  label="Utilisation"
  thresholds={[
    { value: 70, tone: "positive" },
    { value: 90, tone: "warning" },
    { value: 100, tone: "negative" },
  ]}
  format={{ kind: "integer", suffix: "%" }}
  height={220}
  ariaLabel="Capacity utilisation"
/>

Controls

Height

220px

A chart measures its container, so it always needs a definite height.

State

The surface the chart is in — loading, empty and error are drawn by the component.

Accessible name

A drawing is not readable by a screen reader, so it needs a name that states what it shows.

Utilisation: 62%

The same fixture as the live preview above; the controls change how it is drawn, not what it measures.

Code
import { GaugeChart } from "@luc/ui/charts";

<GaugeChart
  value={62}
  min={0}
  max={100}
  label="Utilisation"
  thresholds={[
    { value: 70, tone: "positive" },
    { value: 90, tone: "warning" },
    { value: 100, tone: "negative" },
  ]}
  format={{ kind: "integer", suffix: "%" }}
  height={220}
  ariaLabel="Capacity utilisation"
  state="ready"
/>

Not controllable here

  • series / rows — The numbers are the caller's; the fixture above is the example.
Copy for an AI agentA specification an agent can act on: the import, the setup, the chosen props, the data contract and the accessibility expectation.
Implement `GaugeChart` from Luc UI. It is: Place regimes, events and calendars on one time axis a reader can inspect.

Import it with: import { GaugeChart } from "@luc/ui/charts";
Requires: react ^19.0.0; react-dom ^19.0.0; react-hook-form ^7.0.0 (optional, for @luc/ui/forms/react-hook-form); tailwindcss ^4.0.0; node >= 22 (repository tools). Import the stylesheet once at the app root and wrap the tree in `LucProvider`. Both come from the package that publishes @luc.

Chosen configuration: `height={220}`, `state="ready"`, `ariaLabel="Capacity utilisation"`.

Accessibility: keep the component's own semantics. Do not re-implement its ARIA wiring, do not add roles it does not declare, and make sure every interactive element is reachable and operable from the keyboard with a visible focus state.
Styling: use Luc UI design tokens and the component's own props. Do not restyle with raw colour literals and do not override the component's internal structure with page CSS.
Motion: respect `prefers-reduced-motion`. The component already does, so do not disable it.

Reproduce this state:
```tsx
<GaugeChart
  value={62}
  min={0}
  max={100}
  label="Utilisation"
  thresholds={[
    { value: 70, tone: "positive" },
    { value: 90, tone: "warning" },
    { value: 100, tone: "negative" },
  ]}
  format={{ kind: "integer", suffix: "%" }}
  height={220}
  ariaLabel="Capacity utilisation"
  state="ready"
/>
```

Usage

The values are prepared by the caller: this component draws the points it is given and computes no statistic of its own, so units, scaling and any summary have to be settled before the data reaches it.

It is drawn by the ECharts engine.

Worked examples with real data are on the family overview: Time series & sequence

import { GaugeChart } from "@luc/ui/charts";
<GaugeChart
  value={62}
  min={0}
  max={100}
  label="Utilisation"
  thresholds={[
    { value: 70, tone: "positive" },
    { value: 90, tone: "warning" },
    { value: 100, tone: "negative" },
  ]}
  format={{ kind: "integer", suffix: "%" }}
  height={220}
  ariaLabel="Capacity utilisation"
/>

Data contract

`value`, `min` and `max` define the reading and domain; `thresholds` provides labelled zone boundaries and tones; `format` names the unit. The chart does not evaluate the reading.

Important configuration

Label the measure and its unit, define thresholds in the copy, and keep the domain fixed when comparing gauges.

Guidelines

When not to use

Do not use a gauge for trend over time or for thresholds whose business meaning is unknown; a gauge is a single-state reading.

Configuration

Exported symbols
ExportKindSignature
GaugeChart16 documented props({ value, min, max, label, format, thresholds, variant, title, description, state, height, className, ariaLabel, ariaDescription, onReady, onEvent, }: GaugeChartProps) => import("@types/react").JSX.E…

GaugeChart props

Type: GaugeChartProps

Values the compiler reads from the declaration.

GaugeChart props
PropTypeDefaultNotes
ariaDescription?string | undefined—
ariaLabel?string | undefined—
className?string | undefined—
description?string | undefined—
format?ChartFormat | undefined—
height?string | number | undefined—
label?string | undefined—
max?number | undefined—
min?number | undefined—
onEvent?((event: EChartEvent) => void) | undefined—
onReady?((chart: EChartsInstance) => void) | undefined—
state?ChartState | undefined—
thresholds?readonly GaugeThreshold[] | undefined—Ordered zones drawn along the track, lowest bound first.
title?string | undefined—
valuenumber—
variant?"semi" | "ring" | undefined—`semi` is a 200° arc; `ring` is a full 270° arc.

Accessibility

A chart is a picture of data, so it needs a name that states what it shows, and the numbers must exist as text somewhere on the page — in a table or a written summary — because a drawing is not readable by a screen reader and cannot be copied.

What happens on the server, and when hydration changes it.

Family

Time series & sequence

Regimes, events and calendars over a shared inspection cursor.

Luc UI v1.0GaugeChartdark theme