# Bullet chart

> Use a bullet chart to show a value against a target, with shaded bands that say how good or bad it is.

- Data type: Values per item (`compare`)
- Free (MIT): install with `npx chartreuse add bullet-chart`, or registry item `/r/bullet-chart.json`
- Example: **Of these countries, only Finland's air meets the WHO guideline for fine particles** (Mean annual exposure to PM2.5 air pollution, micrograms per cubic metre, 2023, with the WHO 2021 guideline and interim targets)
- How to read it: Each dark bar is a country's average PM2.5; the green tick is the WHO guideline, and each darker band is a weaker WHO interim target.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9 (best 16:9)

## Use it when
- each value has a target or threshold to meet
- there are meaningful qualitative ranges (poor, fair, good)
- space is tight and many rows must stack

## Avoid it when
- there is no target or band that means something
- the reader needs the change over time (use a line)
- values in different units share one axis

## Fields (data.json)
- `year` (year): year of the estimate
- `rows` (id): list of { country, pm25 }
- `country` (place): a country, or World
- `pm25` (number, unit "µg/m³", format decimal): population-weighted mean annual PM2.5 exposure, µg/m³

Units are the example's: with your own data, set each number field's `unit` and `format` (percent, count, decimal, currency, compact) in the meta you pass to mount, or `chartreuse render --unit field=text --format field=count`. Scales and labels follow your data.

## Interactions, motion, sound
- hover or tap a row to read its value, how many times the guideline it is, and its band
- Motion: The dark bars slide out across the bands, cleanest first, so you see each one cross the guideline.
- Sound: A pop pitched by row on hover. Quiet while it draws and between steps; mute it from its card. (sound is off until the viewer turns it on)

## Example spec
```json
{
  "chart": "bullet-chart",
  "title": "Of these countries, only Finland's air meets the WHO guideline for fine particles",
  "subtitle": "Mean annual exposure to PM2.5 air pollution, micrograms per cubic metre, 2023, with the WHO 2021 guideline and interim targets",
  "data": "/charts/bullet-chart.data.json"
}
```

## Source
World Development Indicators: PM2.5 air pollution, mean annual exposure (EN.ATM.PM25.MC.M3), World Bank (CC BY 4.0), retrieved 2026-12-01: https://data.worldbank.org/indicator/EN.ATM.PM25.MC.M3

Note: Bands are the WHO 2021 Global Air Quality Guidelines for annual PM2.5: guideline 5, interim targets 10, 15, 25 and 35 µg/m³.

Inspired by: [Bullet Graph Design Specification](https://www.perceptualedge.com/articles/misc/Bullet_Graph_Design_Spec.pdf), Stephen Few (linked, not copied).

Live: /charts/bullet-chart · Manifest: /charts/bullet-chart.json · Tags: bullet chart, target, threshold, air pollution, health, environment, cities
