KPI · Intermediate

Bullet chart

Actual value against a target and bands (poor, fair, good).

Open in playground
Use when
Several KPIs with their targets in a small space
Avoid when
There is no target or band

Try it

19

Bullet chart

H1 KPIs (target: vertical tick)
Bullet chartBullet chart. Revenue (100M) 27.4 (target 30), Operating profit (100M) 4.1 (target 3.6), New customers (k) 12.8 (target 15), Satisfaction (pts) 4.3 (target 4.5).Revenue (100M)27.4Operating profit (100M)4.1New customers (k)12.8Satisfaction (pts)4.3
Bullet chart data
Revenue (100M)27.4 / target 30 (91%)
Operating profit (100M)4.1 / target 3.6 (114%)
New customers (k)12.8 / target 15 (85%)
Satisfaction (pts)4.3 / target 4.5 (96%)
New customers lag the mostIntermediate

Hover over the chart, or Tab in and use the arrow keys to move between items. The numbers are sample data.

Variants

Named looks for this chart. Each one is the example above with a few options or fields changed. The CLI (ztd-charts example bullet --variant <id>) and the MCP server know the same names.

Shared axis

H1 KPIs (target: vertical tick)
Sample data

Code

BulletChart.tsx
import { ChartCard, BulletChart } from "ztd-charts";

const data = [
  {"kpi":"Revenue (100M)","actual":27.4,"target":30,"poor":18,"ok":25,"good":34},
  {"kpi":"Operating profit (100M)","actual":4.1,"target":3.6,"poor":2,"ok":3,"good":5},
  {"kpi":"New customers (k)","actual":12.8,"target":15,"poor":8,"ok":12,"good":18},
  {"kpi":"Satisfaction (pts)","actual":4.3,"target":4.5,"poor":3.5,"ok":4,"good":5},
];

export function Example() {
  return (
    <ChartCard number="19" title="Bullet chart" subtitle="H1 KPIs (target: vertical tick)" takeaway="New customers lag the most" level="intermediate" replay>
      <BulletChart
        data={data}
        label="kpi"
        value="actual"
        target="target"
        ranges={["poor","ok","good"]}
      />
    </ChartCard>
  );
}

Props

<BulletChart> takes these props. Rows marked Common work the same on every chart.

27 props

Prop
dataRequiredAn array of objects. Pass CSV, REST or database rows as they areobject[]
labelRequiredItem name fieldstring | (d, i) => string
valueRequiredActual value fieldstring | (d, i) => number
targetTarget fieldstring | (d, i) => number
rangesBand boundary fields (smallest first)string[]
independentSeparate axis range per rowbooleanDefault true
heightCommonHeight in px. Without it, each chart picks a default that fits its widthnumber
widthCommonFixed width in px. Without it, the chart fits its parentnumber
highlightCommonItem to highlight. An index, a name, an array, or "max" | "min" | "first" | "last" | "none"number | string | (number|string)[] | "max" …
formatCommonValue format. "number" | "integer" | "percent" (values are already percents: 42 → "42%") | "ratio" (0.42 → "42%") | "compact" | "currency" (KRW for Korean locales, otherwise USD; for another currency pass Intl options with currency) | "decimal" or Intl.NumberFormat options"number" | "percent" | "compact" | …
unitCommonUnit appended to values. For example "%" or "ms"string
localeCommonLocale for numbers, dates and the text a chart writes itself (tooltips, screen reader sentences). "ko" or "ko-*" switches to Korean. Falls back to the ThemeProvider localestringDefault "en-US"
animateCommonEntry and update animationbooleanDefault true
durationCommonAnimation length (ms)number
easingCommonMotion curve"spring" | "easeOut" | "easeInOut" | "linear"Default "spring"
staggerCommonDelay between items as they enter (ms)number
reducedMotionCommon"auto" follows the OS setting. true always turns motion offanyDefault "auto"
animateOnViewCommonPlay when the chart scrolls into viewbooleanDefault true
showLabelsCommonLabels drawn on the chart (values and names)booleanDefault true
tooltipCommonShow tooltips. { template: "{label} · {value} · owner {owner}" } writes them: {label}, {value}, {series} or any other column of the row. \n starts a new line, and a line with an empty value is left outtooltipDefault true
syncIdCommonCharts with the same syncId show the hovered x together (line, area, bar, candlestick). <ChartGrid sync> sets one for every chart inside itstring
ariaLabelCommonName for screen readersstring
descriptionCommonDescription for screen readers. Built from the data when omittedstring
onHoverCommonRuns when hover or keyboard focus moves to another item(e: ChartEvent | null) => void
onClickCommonRuns on click, Enter or Space(e: ChartEvent) => void
replayKeyCommonReplays the entry animation when it changesstring | number
themeCommonChanges theme tokens for this chart onlyPartial<ChartTheme>