# Dot plot

> Use a dot plot to compare two or three values per item on one shared scale, with less ink than bars.

- Data type: Values per item (`compare`)
- Free (MIT): install with `npx chartreuse add dot-plot`, or registry item `/r/dot-plot.json`
- Example: **Women outlive men everywhere, and by more than a decade in Ukraine and Russia** (Life expectancy at birth, years, 2023)
- How to read it: Each row is a country: the blue dot is women, the orange dot is men, and the number on the right is the gap.
- Interactive: sort
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9 (best 16:9)

## Use it when
- two or three values per item on the same scale
- the axis need not start at zero
- 10 to 30 rows that should stay quiet and precise

## Avoid it when
- the values are amounts that should start at zero (use bars)
- more than three values per row
- the change over time matters more than the gap (use a dumbbell)

## Fields (data.json)
- `country` (category): the row (a country in the example)
- `women` (number, unit "years", format decimal): the first value, drawn in the first ink; the gap is it minus the second (women's life expectancy at birth in the example, years); its name is hints.sides[0]
- `men` (number, unit "years", format decimal): the second value (men's life expectancy at birth in the example, years); its name is hints.sides[1]

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 both values and the gap
- the sort buttons reorder the rows
- Motion: The two dots in each row start together and part to their values, so the gap opens up as you watch.
- Sound: A pop pitched by row on hover; a whoosh when the rows re-sort. 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": "dot-plot",
  "title": "Women outlive men everywhere, and by more than a decade in Ukraine and Russia",
  "subtitle": "Life expectancy at birth, years, 2023",
  "data": "/charts/dot-plot.data.json"
}
```

## Source
World Development Indicators: Life expectancy at birth, female and male (SP.DYN.LE00.FE.IN, SP.DYN.LE00.MA.IN), World Bank (from UN World Population Prospects) (CC BY 4.0), retrieved 2026-12-01: https://data.worldbank.org/indicator/SP.DYN.LE00.FE.IN

Note: Estimates for Ukraine and Russia since 2022 are modelled by the UN and are less certain than usual.

Live: /charts/dot-plot · Manifest: /charts/dot-plot.json · Tags: dot plot, Cleveland dot plot, gender gap, life expectancy, health, two values
