# Dumbbell

> Use a dumbbell to show one change per item: where each started, where it ended, and the gap between.

- Data type: Values per item (`compare`)
- Free (MIT): install with `npx chartreuse add dumbbell`, or registry item `/r/dumbbell.json`
- Example: **Every region gained decades of life since 1950** (Life expectancy at birth, years, 1950 and 2023)
- How to read it: Each line joins 1950 (hollow) to 2023 (filled) for one region; longer lines are bigger gains.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9, 9:16 (best 16:9)

## Use it when
- each item has exactly two values (before and after, with and without)
- the size of the change matters more than the path
- there are 3 to 15 items

## Avoid it when
- you have many time points (use a line or a slope)
- the two values are in different units
- only one item changes (use a big number)

## Fields (data.json)
- `region` (category): the item
- `y1950` (number, unit "years", format decimal): the start value (the hollow dot): life expectancy in 1950, years; its label is hints.from, else the year in this description, else "start"
- `y2023` (number, unit "years", format decimal): the end value (the filled dot): life expectancy in 2023, years; its label is hints.to, else the year in this description, else "end"

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 gain
- Motion: The filled dot travels from the start to the end value when the chart comes into view, drawing the gain.
- Sound: A soft pop on hover, pitched by row. 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": "dumbbell",
  "title": "Every region gained decades of life since 1950",
  "subtitle": "Life expectancy at birth, years, 1950 and 2023",
  "data": "/charts/dumbbell.data.json"
}
```

## Source
Life expectancy, Our World in Data (UN World Population Prospects, HMD, Zijdeman et al.) (CC BY 4.0), retrieved 2026-12-01: https://ourworldindata.org/grapher/life-expectancy

Live: /charts/dumbbell · Manifest: /charts/dumbbell.json · Tags: before and after, change, gap, two values, comparison
