# Bump chart

> Use a bump chart to show how ranks change over time, when who overtakes whom matters more than by how much.

- Data type: Values over time (`time`)
- Pro · not released yet: its code is not available; try it on its page, or use a free chart of the same data type (`time`)
- Example: **China rose from ninth to second among today's ten largest economies** (Rank by GDP in current US dollars among the ten largest economies of 2023, 1980 to 2023)
- How to read it: Each line is one country; higher is a bigger economy, and every crossing is an overtaking.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9 (best 16:9)

## Use it when
- the order matters more than the gaps
- 5 to 12 items over several time points
- overtakings are the story

## Avoid it when
- the size of the gaps matters (use lines on a value axis)
- many ties
- items enter and leave the set often

## Fields (data.json)
- `years` (year): the time points
- `countries[].name` (category): the item being ranked (5 to 12)
- `countries[].gdp` (number, unit "billion USD", format count): GDP in current US dollars, billions, one per year; the rank is computed from it

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 a line to light it and read its start and end rank
- hover a dot for that year's rank and GDP
- Play steps through the years
- Motion: Lines draw on left to right and the dots pop in as each year is reached.
- Sound: A pop pitched by rank 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": "bump-chart",
  "title": "China rose from ninth to second among today's ten largest economies",
  "subtitle": "Rank by GDP in current US dollars among the ten largest economies of 2023, 1980 to 2023",
  "data": "/charts/bump-chart.data.json"
}
```

## Source
GDP (current US$), NY.GDP.MKTP.CD, World Bank, World Development Indicators (CC BY 4.0), retrieved 2026-12-01: https://data.worldbank.org/indicator/NY.GDP.MKTP.CD

Note: Ranks are among these ten only, not the whole world; current dollars move with exchange rates.

Live: /charts/bump-chart · Manifest: /charts/bump-chart.json · Tags: bump, rank, ranking over time, economy, GDP, overtake
