Bullet Chart
Compare a measure with a target against qualitative ranges, one compact row per metric.
Overview
A bullet chart, designed by Stephen Few, packs a gauge's information into a single row: the measure is a bar, the target is a tick across it, and shaded bands behind it mark qualitative ranges such as poor, satisfactory, and good. Stack several rows to review many metrics in the space of one gauge.
Each row has its own scale, so revenue in thousands, profit in percent, and satisfaction out of five can sit side by side. Do not compare bar lengths between rows; compare each bar with its own target and bands.
Anatomy
BulletChart turns each data row into a bullet with a title, an optional description line, and a scale running from zero to the row's maximum. The maximum is the last range threshold, the value, or the target, whichever is largest, unless maxDataKey sets it. Compose the parts you need: Ranges draws the bands, Measure the bar, Target the tick, and Axis the per-row tick labels. Add Tooltip and Legend for detail.
The bands run from darkest to lightest using shades of the foreground color, as Few recommends, so they stay readable in grayscale and never compete with the measure's color.
Accessibility
The default ariaLabel reads every row's value and target, so a screen reader hears the whole comparison without the canvas. Name ranges with rangeLabels so the tooltip can say which band a value falls in. If being over or under target matters, say it in nearby text too: the tick's position alone is a subtle cue.
Installation
Usage
import { BulletChart, type ChartConfig } from "honestui/charts";const data = [
{ metric: "Revenue", unit: "USD, thousands", actual: 271, target: 250, ranges: [150, 225, 300] },
{ metric: "Profit", unit: "%", actual: 22.5, target: 26, ranges: [20, 25, 30] },
];
<BulletChart
data={data}
config={chartConfig}
labelDataKey="metric"
descriptionDataKey="unit"
valueDataKey="actual"
targetDataKey="target"
rangesDataKey="ranges"
rangeLabels={["Poor", "Satisfactory", "Good"]}
>
<BulletChart.Tooltip />
<BulletChart.Axis />
<BulletChart.Ranges />
<BulletChart.Measure />
<BulletChart.Target />
</BulletChart>Range thresholds are ascending upper bounds: [150, 225, 300] draws bands from 0 to 150, 150 to 225, and 225 to 300. Give the chart roughly 56px per row with an axis, or 36px without one.
Examples
Compact
Leave out Axis for a dense tile, and raise the measure's thickness and the target's length so the rows stay legible at a small size. Here every row shares the same thresholds, so one set of range labels describes them all.
Loading State
isLoading draws neutral placeholder rows with the shared loading label.
API Reference
BulletChart.Ranges takes no props. Include it to draw the qualitative bands.