Numbers with year bars <YearBars />
1–2 big numbers on the left (unit as superscript), 3–7 thin horizontal bars ordered by year on the right, the latest year in the accent colour. Designed for the biennale style; other styles work too.

- Group
- Data · two big numbers with thin bars by year
- Component
YearBars·#year-bars
Good for
- One metric grows year by year, with one or two takeaway numbers
- An annual review, visitor numbers or revenue
Avoid when
- You are comparing several series: use LineChart
- There are more than 7 years: use LineChart
Content limits
| 1 | stats 1–2: value ≤ 5 characters, unit ≤ 3, label ≤ 12 chars, body ≤ 24 chars |
| 2 | bars 3–7, earliest to latest |
| 3 | slide title ≤ 22 chars |
| 4 | source is required |
Fields
| Field | Type | |
|---|---|---|
kicker · required | string | Section label |
title · required | string | string[] | Title |
lead | string | Lead |
stats · required | { value, unit?, label, body? }[] | Big numbers |
bars · required | { year, value }[] | Year bars |
format | (v: number) => string | Format of the number at the end of each bar |
source | string | Source |
Example
<YearBars
kicker="全球太阳能发电"
title="十年涨到约 11 倍"
stats={[{ value: '2,779', unit: 'TWh', label: '2025 年发电量' }]}
bars={[{ year: '2015', value: 256 }, …]}
source="…"
/>