# Face-off

> Use a face-off when the whole story is two numbers: two sized circles side by side, the winner marked with its margin.

- 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: **India has overtaken China as the world's most populous country** (Population, billions, 1960 to 2025; press Play to watch the lead change)
- How to read it: Each circle's area is one country's population in the year shown; the ribbon sits on the bigger one with its lead.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9 (best 16:9)

## Use it when
- exactly two items, and which is bigger is the point
- a headline comparison for a talk, a video or a social post
- the lead changes over time and you want to show the moment it flips

## Avoid it when
- more than two items (use sorted bars)
- the values are close and the exact gap matters (state the numbers)
- readers must judge small differences in area

## Fields (data.json)
- `year` (year): the year
- `india` (number, unit "people", format count): India's population, people
- `china` (number, unit "people", format count): China's population, people

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 circle to read its population and the gap
- Play steps through every year from 1960, with a chime the year India takes the lead
- Motion: Both circles swell from dots to their size while the numbers count up, then the winner's ribbon appears; Play grows and shrinks them year by year.
- Sound: A chime when the winner is revealed and the year the lead changes. 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": "face-off",
  "title": "India has overtaken China as the world's most populous country",
  "subtitle": "Population, billions, 1960 to 2025; press Play to watch the lead change",
  "data": "/charts/face-off.data.json"
}
```

## Source
World Development Indicators: Population, total (SP.POP.TOTL), World Bank (CC BY 4.0), retrieved 2026-12-01: https://data.worldbank.org/indicator/SP.POP.TOTL

Note: The World Bank's series shows India ahead from 2021; the UN's World Population Prospects dates the crossing to 2023.

Live: /charts/face-off · Manifest: /charts/face-off.json · Tags: face-off, versus, head to head, two numbers, population, India, China
