Keep KPI units and band thresholds explicit instead of compressing context into a gauge.
Bullet charts: show a measure, target and performance bands honestly
One axis carries one measure
A bullet chart places an observed value and a target on a shared quantitative scale, often with qualitative background bands. It fits a compact dashboard, but the target and bands must use the same unit and period as the observation. A monthly result against an annual target is not meaningful unless the annual target is allocated by a stated rule. Baseline and axis integrity matter even in a small card. Show the observed number and target in text so the graphic is not the sole carrier of the result.
Treat bands as policy, not decoration
Labels such as below, meets and exceeds imply thresholds selected for a reason. Store the numeric band boundaries and their version. If leadership changes a target, historical cards should either retain the old policy or clearly restate history under the new one. A band extending from 47 to 81 is not an uncertainty interval; it is a classification rule. Uncertainty intervals have a different meaning and should not share the same visual treatment.
Direction changes the interpretation
For revenue, higher may be preferable; for response time, lower may be preferable. The chart's target marker is descriptive until the preferred direction is declared. Put that direction in the accompanying text and label the bands accordingly. A single color progression cannot safely carry this distinction. Accessible text and non-color cues should state whether 68 seconds is better or worse than a target of 59 seconds. A zero target needs a deliberate percentage policy; percent-of-target is undefined there.
Compare cards using a shared contract
Several bullet charts can support comparison only if they use compatible axes or clearly named units. Autoscaling each card to its own maximum makes equal lengths represent different values. If metrics use incompatible units, separate panels and display target-relative gaps explicitly, rather than placing them on one fake common scale. Signed gap views may be clearer for ranking departures from target. Export raw value, target, bands, direction and period. Check missing observations and partial periods before applying a performance label.
Worked contract
from math import isfinite
def classify_kpi(observed: float, target: float,
minimum: float, maximum: float,
lower_is_better: bool) -> tuple[float, str]:
values = (observed, target, minimum, maximum)
if any(not isfinite(value) for value in values):
raise ValueError("KPI values must be finite")
if not minimum <= observed <= maximum or not minimum <= target <= maximum:
raise ValueError("measure or target outside axis")
gap = observed - target
meets = observed <= target if lower_is_better else observed >= target
return gap, "meets target" if meets else "misses target"
response_kpi = classify_kpi(68, 59, 0, 120, lower_is_better=True)
assert response_kpi == (9, "misses target")
revenue_kpi = classify_kpi(81, 59, 0, 120, lower_is_better=False)
assert revenue_kpi == (22, "meets target")Performance and operating cost
Classifying one card takes O(1) time and space; N cards take O(N). Rendering cost is small, but target lookup and policy versioning dominate operational correctness. The code checks a shared axis and preferred direction. It does not invent background bands or calculate a percentage when the target is zero. Store band thresholds and time period with the emitted card to make historical comparisons reproducible.
Common Mistakes
- Comparing a monthly observed value with an annual target.
- Using attractive background bands without a stated threshold policy.
- Assuming higher is always better.
- Letting each card auto-scale while comparing bar lengths across cards.
Validation drill
Build three service KPI cards: response time, resolved tickets and refund rate. Declare direction, target, axis and band policy for each, then test a missing observation and a zero target.
Read next
- Axis scales, baselines and labels: prevent a correct number from telling a false story
- Uncertainty on charts: show denominators and intervals beside estimates
- Accessible charts: encode meaning without relying on color alone
- Diverging bars: put signed differences on one shared zero
