# Progress Chart

Progress chart for quotas and goals: meters, a segmented bar and a waffle.

- Category: Charts
- Page: https://wunderui.com/components/progress-chart
- Tier: Core and Pro

## Install

Progress Chart ships with WunderUI Core and Pro in the @wunderui/react package.

## Import

```tsx
import { ProgressChart, ProgressChartProps, ProgressChartVariant } from "@wunderui/react"
```

## Minimal usage

Then use it:

```tsx
import { ProgressChart } from "@wunderui/react/charts"

const data = [
  { name: "API requests", value: 72 },
  { name: "Storage", value: 48 },
  { name: "Seats", value: 90 },
]

export function PlanUsage() {
  return <ProgressChart data={data} index="name" max={100} label="Plan usage" />
}
```

Expected result: You should see three bars filled to 72, 48 and 90 percent, each with its name.

## When to use

### Use Progress Chart for

- Usage against a quota: requests, storage, seats
- Completion of several tasks or goals
- One bar split into parts (segmented), or a single percentage as a waffle

### Use something else

- [Radial Chart](https://wunderui.com/components/radial-chart) for progress as rings
- [Gauge Chart](https://wunderui.com/components/gauge-chart) for one value on a scale with bands
- [Bullet Chart](https://wunderui.com/components/bullet-chart) for a measure against a target and ranges
- [Progress](https://wunderui.com/components/progress) for a single progress bar inside a form or a card

## Keyboard

The plot is focusable: Arrow keys step through the rows or segments and the live region announces the name and progress, not a share of the total.

| Key | Action |
|---|---|
| `Tab` or `Shift+Tab` | Moves focus to the plot and away from it. The plot is one tab stop; so is every legend badge. |
| `ArrowRight` or `ArrowLeft` | Moves to the next or previous row. The tooltip follows, and a live region announces the one you are on. The first press starts at the first one (Left: the last one). |
| `Home` or `End` | Jumps to the first or last row. |
| `Escape` | Clears the active point. |
| `Enter` or `Space` | On a legend badge of a ChartCard: switches its series off or on. The last visible series stays on. |

## Behavior

What the chart does on its own and what the page decides.

- **Against max:** The max is the value of a full bar, or of the whole waffle (default 100). Without a formatter the values read as a percent of the max.
- **Variants:** A meter is a track with a fill and a label per row, and the segmented variant is one bar split into the rows' shares that opens as one bar. The waffle fills 100 cells in reading order and adds up to exactly 100.
- **Hover and colour:** Hovering a row (a meter, a segment or its legend row, a group of waffle cells) dims the others to --chart-dim. Meters take the palette order; the segmented bar and the waffle take the indigo tones, because their parts make one whole (palette changes it, colors wins).
- **Labels:** A row's name and its value share a line. On a narrow card the name is shortened with an ellipsis before it could touch the value; the tooltip and the table keep it whole.
- **Announcement:** The live region reads Direct: 42%, or 42 GB of 100 GB with a custom formatter.
- **Loading, empty and error:** The chart keeps its size while loading, empty or failed, so the card never changes height. Add a retry handler to show a Try again button on error.
- **Legend:** In a ChartCard, each series badge is a button that switches its series off, but the last visible series stays on. A legend of roles can be made static.
- **Data table:** The chart renders its data as a table for screen readers, in the same order as the plot.
- **Size:** The chart fills the width of its container and you set the plot height. Text never scales, so labels keep their size at every width.

## Motion

The enter sequence and the hover follow the motion tokens of the library.

- **Fill:** Bars grow in from the left and waffle cells fill in reading order when the chart first comes into view, after loading and when new data arrives. The animation can be turned off.
- **Reduced motion:** With reduced motion on, the chart appears at once without the enter sequence. The tooltip and every state still work.

## Anatomy

- `ProgressChart`: Pass the data with the field names for the row name and the value. The max is the value of a full bar or the whole waffle (default 100), and without a formatter values read as percent of max.
- `Plot`: The focusable region. Arrow keys step through the rows or segments and announce the name and progress, such as Direct: 42%, not a share of the total.
- `Marks`: Meters are a track with a fill and a label row, and the segmented variant is one bar split into the rows' shares. The waffle fills 100 cells, rounded to add up to exactly 100.
- `Tooltip`: The row name with its progress as a percentage of the max.
- `Loading, empty and error`: Five muted tracks under the shimmer. The error title defaults to The chart could not be loaded.
- `Data table and live region`: A table of the rows and values for screen readers.
- `Progress Segments`
- `Waffle Empty`

## Best practices

### When to use

- Use ProgressChart for completion against a target, such as storage used or onboarding steps done. Use BulletChart when a target marker and quality bands matter.

### Do

- Use the meter when each row has its own target, and the segmented bar when rows are parts of one total, such as storage by file type.
- Show the value in text next to each bar. A fill length without a number cannot be compared between rows.
- Use the waffle for one proportion that you want people to count, for example 37 of 100 customers. Keep it to three or four colours.

### Don't

- Don't use a full bar for something that cannot be completed, such as a revenue figure. A bar suggests an end that does not exist.
- Don't show a bar over 100 percent as full without saying so. The fill stops at the max; put the overshoot in the label.

## API reference

### ProgressChart

| Prop | Type | Default | Description |
|---|---|---|---|
| data* | readonly ChartDatum[] |  | One object per slice / ring / axis. |
| index* | string |  | Field holding the label. |
| activeIndex | number \| null |  | The active point (hovered or focused) as an index into `data`, to control it yourself. `null` shows none. |
| animate | boolean |  |  |
| animationKey | string \| number |  |  |
| className | string |  | Extra classes for the root element of the chart. |
| colors | readonly ChartColor[] |  | Colours per row, in order (palette names or token expressions). |
| defaultActiveIndex | number \| null |  | The point that is active at first, for an uncontrolled chart. It shows the tooltip without a pointer. |
| description | string |  |  |
| emptyDescription | string |  | Text under the title in the empty state. |
| emptyTitle | string |  | Title of the message in the empty state. |
| errorDescription | string |  | Text under the title in the error state. |
| errorTitle | string |  | Title of the message in the error state. |
| height | number |  | Height of the plot frame in px. Default 280 (Figma small card plot). |
| hiddenSeries | readonly string[] |  | Labels of rows switched off in the legend: drawn faded. |
| label | string |  | Accessible name, e.g. the card title. |
| max | number | 100 | Value of a full bar / of the whole waffle (default 100). |
| onActiveIndexChange | (index: number \| null) => void |  | Called with the index when the pointer or the arrow keys move to another point, and with `null` when they leave. Use it to show the hovered value in a headline. |
| onRetry | () => void |  | Shows a Try again button in the error state and calls this when it is pressed. |
| palette | "indigo" \| "series" |  | Row colours when `colors` is not set: `indigo` gives the rows the indigo tonal scale (600 → 200, the parts of one whole), `series` the palette order. Default: `series` for the meter (separate measures), `indigo` for the segmented bar and t… |
| state | "ready" \| "loading" \| "empty" \| "error" |  |  |
| tooltip | boolean |  |  |
| value | string |  | Field holding the value. Default "value". |
| valueFormatter | ChartValueFormatter |  |  |
| variant | "meter" \| "segmented-progress" \| "waffle" | "meter" | Figma variant. Default `meter`. |
| width | number |  |  |

## Examples

### States

### Long labels

## In context

### Plan Usage Meters

Included usage per resource with alerts.

### Onboarding Checklist

Setup progress and the checklist with status badges.

### Savings Goals

A waffle for one savings pot and progress per pot.

## For AI agents

`get_component("progress-chart")`

Hand your agent this page as Markdown or the WunderUI MCP server, not a screenshot.
