Overview
A tracker draws one block per period and colors it by status, the pattern behind status pages and uptime monitors. Use it when each period has one categorical state, such as operational, degraded, or down, and readers need to spot when problems happened. When the measure is continuous, such as latency or error rate, use a Line Chart or a Sparkline instead.
Anatomy
Tracker reads a status and a label from each row. The status names a config entry, which supplies that status's color and label; a missing or unknown status renders as a neutral "no data" block. Blocks share the width evenly, separated by gap. The optional tooltip shows the label, the status, an optional valueKey value, and a detailFormatter note. showLegend lists the statuses from config under the blocks.
Accessibility
Color is not the only signal. Every block is a list item with an accessible name such as "Oct 8: Outage, 97.1%", and the list's generated name counts each status, for example "90 periods: 85 Operational, 3 Degraded, 1 Outage, 1 Maintenance". The blocks form one tab stop: arrow keys, Home, and End move between them, and focus shows the same tooltip as hover. With onBlockClick, Enter and Space activate the focused block. Write the headline figure, such as the uptime percentage, in real text near the tracker.
Installation
Usage
import { Tracker, type ChartConfig } from "honestui/charts";const chartConfig = {
operational: { label: "Operational", colors: { light: ["#10b981"] } },
degraded: { label: "Degraded", colors: { light: ["#f59e0b"] } },
outage: { label: "Outage", colors: { light: ["#ef4444"] } },
} satisfies ChartConfig;
<Tracker
data={days}
config={chartConfig}
statusKey="status"
labelKey="date"
valueKey="uptime"
valueFormatter={(value) => `${value}%`}
showLegend
/>Unlike the canvas charts, the tracker is drawn with DOM elements, so each block can take focus and hundreds of periods stay crisp at any width.
Examples
One row per service
Several trackers share one config, so a status page reads as a single grid. Periods before a service launched have a null status and show the emptyLabel.
Loading State
Pass isLoading to draw neutral blocks with the same loading treatment as the other Honest UI charts.