← All templates

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

1stats 1–2: value ≤ 5 characters, unit ≤ 3, label ≤ 12 chars, body ≤ 24 chars
2bars 3–7, earliest to latest
3slide title ≤ 22 chars
4source is required

Fields

FieldType
kicker · requiredstringSection label
title · requiredstring | string[]Title
leadstringLead
stats · required{ value, unit?, label, body? }[]Big numbers
bars · required{ year, value }[]Year bars
format(v: number) => stringFormat of the number at the end of each bar
sourcestringSource

Example

<YearBars
  kicker="全球太阳能发电"
  title="十年涨到约 11 倍"
  stats={[{ value: '2,779', unit: 'TWh', label: '2025 年发电量' }]}
  bars={[{ year: '2015', value: 256 }, …]}
  source="…"
/>