# Marble race

> Use a marble race to compare speeds or rates: every marble starts together and rolls at its value, and the frame freezes when the fastest crosses the line, so distance covered reads as a bar.

- Data type: Values per item (`compare`)
- Pro · not released yet: its code is not available; try it on its page, or use a free chart of the same data type (`compare`)
- Example: **A cheetah outruns every other land animal, by about 24 km/h** (Top recorded running speeds of fast land animals, km/h)
- How to read it: Each marble rolls at one animal's top speed; when the cheetah finishes, the others are as far along as their speed allows.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9, 9:16 (best 9:16)

## Use it when
- the values are speeds, rates or paces
- a race is a natural way to tell who wins and by how much
- 4 to 10 items

## Avoid it when
- values can be negative
- speeds are uncertain and the ranking hinges on small differences (show the ranges)
- more than about 10 lanes

## Fields (data.json)
- `animal` (category): the runner
- `group` (category): Mammals, Birds or Reptiles
- `low` (number, unit "km/h", format count): low end of the reported top speed, km/h
- `high` (number, unit "km/h", format count): high end of the reported top speed, km/h

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 lane to read the speed range
- Race again restarts the countdown
- Motion: A three-second countdown, then the marbles accelerate together and roll, spinning, at their relative speeds; the race freezes as the cheetah reaches the finish.
- Sound: A whoosh at the start; a chime at the finish; a pop on hover. Quiet while it draws and between steps; mute it from its card. (sound is off until the viewer turns it on)
- Physics settings: gravity, size (the Studio's Physics section, a look's `physics`, or `render --physics key=value`; docs/look-format.md)

## Example spec
```json
{
  "chart": "marble-race",
  "title": "A cheetah outruns every other land animal, by about 24 km/h",
  "subtitle": "Top recorded running speeds of fast land animals, km/h",
  "data": "/charts/marble-race.data.json"
}
```

## Source
Fastest animals, Wikipedia (CC BY-SA 4.0), retrieved 2026-12-01: https://en.wikipedia.org/wiki/Fastest_animals

Note: Top speeds of animals are hard to measure and sources disagree; marbles use the high end of each reported range, and the faint bar shows the range. Bears are the grizzly and American black bear, listed together.

Live: /charts/marble-race · Manifest: /charts/marble-race.json · Tags: race, speed, rank, bar alternative, animals, nature, playful
