Compare and rank
Bar chart race
Animates category bars through time to show changes in rank and magnitude.
- Chart
- Ranking
- Trend over time
What it answers
Who leads at each time and when do leaders change?
- Shape
- Animated ranked bars
- What it shows
- Turnover, entry, exit and changing magnitude.
Example
The question
How has the ranking of cities by customer numbers changed year by year?
Customers by city, one frame of an animated race (thousands)
Illustrative data. It belongs to no company.
When to use it
Use it when
Presenting rank changes over many periods.
Avoid it when
When exact cross-period comparison or reduced-motion access is essential without a static alternative.
How to read it
Use time controls, follow labels and pause to compare bar lengths.
Note
Keep category identity consistent across frames.
The data you need
- Layout
- Long table
- Fields
- Period: ordered date/number; Item: text; Value or Rank: number
- One row is
- One item in one period. What is the grain?
- Rules
- If deriving ranks, state ascending/descending order and tie rules. Explicitly distinguish rank from magnitude.
- Optional
- Optional precomputed Rank. Fill missing periods only under a stated rule.
- Preparation
- Aggregate and rank within every frame; align item IDs, dates and animation scale rules.
- Units
- Use the measured variable's stated unit consistently. No denominator is implied unless the value is a rate or proportion.
Worked example
Data Jan: A30, B45; Feb: A50, B40. Animate between ranked frames. A overtakes B; provide the same two frames statically.
| Period | Item | Value |
|---|---|---|
| 2026-01 | A | 30 |
| 2026-01 | B | 45 |
| 2026-02 | A | 50 |
| 2026-02 | B | 40 |
