Skip to content
WunderUI

Progress Chart

Pro

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

Playground

Plan usage

Progress chart, 4 parts: API requests 72%, Storage 48%, Seats 90%, Build minutes 31%.
Plan usage, data table
nameValue
API requests72%
Storage48%
Seats90%
Build minutes31%

Installation

Progress Chart comes with WunderUI Core and Pro, in the package from your plan. See the plans.

The charts live in their own entry point: import the chart, its card and its hooks from @wunderui/react/charts, not from @wunderui/react.

Then import what you need:

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

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 for

States

Loading, empty and error keep the chart's size, so the card never jumps. Add a retry handler and the error state offers a Try again button.

Plan usage

Progress chart, 4 parts: API requests 72%, Storage 48%, Seats 90%, Build minutes 31%.
Plan usage, data table
nameValue
API requests72%
Storage48%
Seats90%
Build minutes31%

Keyboard interactions

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.

TaborShiftTab
Moves focus to the plot and away from it. The plot is one tab stop; so is every legend badge.
ArrowRightorArrowLeft
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).
HomeorEnd
Jumps to the first or last row.
Escape
Clears the active point.
EnterorSpace
On a legend badge of a ChartCard: switches its series off or on. The last visible series stays on.

Behavior and motion

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. The waffle fills 100 cells in reading order and adds up to exactly 100.
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 shows completion: meters with one bar per row, a segmented bar where rows are parts of one bar, and a 10 by 10 waffle where each cell is one percent. Bars grow in from the left.

Plan usage

Progress chart, 4 parts: API requests 72%, Storage 48%, Seats 90%, Build minutes 31%.
Plan usage, data table
nameValue
API requests72%
Storage48%
Seats90%
Build minutes31%
  • 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.

  • data-slot="chart-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.

  • data-slot="chart-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.

  • data-slot="chart-tooltip"Optional

    The row name with its progress as a percentage of the max.

  • data-slot="chart-message"Optional

    Five muted tracks under the shimmer. The error title defaults to The chart could not be loaded.

  • A table of the rows and values for screen readers.

Best practices

  • 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.

  • Do

    Show the value in text next to each bar. A fill length without a number cannot be compared between rows.

  • Do

    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

    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

One table for ProgressChart, listing every prop. A ChartCard around it takes its own props, and the chart works without one.

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.

PropTypeDefaultDescription
data requiredreadonly ChartDatum[]—One object per slice / ring / axis.
index requiredstring—Field holding the label.
valuestring—Field holding the value. Default "value".
variant"meter" | "segmented-progress" | "waffle""meter"Figma variant. Default .
maxnumber100Value of a full bar / of the whole waffle (default 100).
colorsreadonly ChartColor[]—Colours per row, in order (palette names or token expressions).
valueFormatterChartValueFormatter—
labelstring—Accessible name, e.g. the card title.
heightnumber—Height of the plot frame in px. Default 280 (Figma small card plot).
state"ready" | "loading" | "empty" | "error"—
hiddenSeriesreadonly string[]—Labels of rows switched off in the legend: drawn faded.
activeIndexnumber | null—The active point (hovered or focused) as an index into , to control it yourself. shows none.
animateboolean—
animationKeystring | number—
defaultActiveIndexnumber | null—The point that is active at first, for an uncontrolled chart. It shows the tooltip without a pointer.
descriptionstring—
emptyDescriptionstring—Text under the title in the empty state.
emptyTitlestring—Title of the message in the empty state.
errorDescriptionstring—Text under the title in the error state.
errorTitlestring—Title of the message in the error state.
onActiveIndexChange(index) => void—Called with the index when the pointer or the arrow keys move to another point, and with 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.
tooltipboolean—
widthnumber—

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

MCPget_component("progress-chart")
InstallIncluded in Core and Pro

The full library index for assistants is at /llms.txt.