# Time curve

> Use a time curve to show how a many-sided state drifts, stalls or loops back: each moment is a point, and similar moments sit close together.

- Data type: Values over time (`time`)
- Pro · not released yet: its code is not available; try it on its page, or use a free chart of the same data type (`time`)
- Example: **Germany's power mix moved away from coal, then looped back in 2021 and 2022** (Germany's electricity by source (coal, gas, nuclear, wind, solar, hydro, bioenergy, oil), each year's mix as one point, 1990 to 2025)
- How to read it: Each dot is one year's mix of eight sources; the line joins the years in order, and dots close together had similar mixes.
- Phone: Not recommended for mobile (3 labels are cut off at the drawing's edge) · Video formats: 16:9 (best 16:9)

## Use it when
- each moment has many measures and the overall state matters
- you suspect the state returns to earlier ones (cycles, reversals)
- the pace of change matters: long jumps are big changes

## Avoid it when
- readers need the value of any one measure (use lines or a stacked area)
- the audience can't be told the axes have no units
- only one or two measures (use a connected scatter)

## Fields (data.json)
- `sources` (category): the eight electricity sources, in the order of shares
- `years[].year` (year): the year
- `years[].shares` (number, unit "%", format percent): % of electricity from each source that year

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 dot to read that year's three biggest sources and how much the mix moved
- Play walks a ring along the curve year by year
- Motion: The curve draws itself through time, with each year's dot appearing as the line reaches it, then arrows show the direction.
- Sound: 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)

## Example spec
```json
{
  "chart": "time-curve",
  "title": "Germany's power mix moved away from coal, then looped back in 2021 and 2022",
  "subtitle": "Germany's electricity by source (coal, gas, nuclear, wind, solar, hydro, bioenergy, oil), each year's mix as one point, 1990 to 2025",
  "data": "/charts/time-curve.data.json"
}
```

## Source
Share of electricity production by source, Our World in Data (Ember; Energy Institute Statistical Review of World Energy) (CC BY 4.0), retrieved 2026-12-01: https://ourworldindata.org/grapher/share-elec-by-source

Note: Positions come from classical multidimensional scaling of the eight shares, computed in the chart; only distances between dots mean anything.

Inspired by: [Time Curves: Folding Time to Visualize Patterns of Temporal Evolution in Data](https://aviz.fr/~bbach/timecurves/), Benjamin Bach, Conglei Shi, Nicolas Heulot, Tara Madhyastha, Tom Grabowski, Pierre Dragicevic (linked, not copied).

Live: /charts/time-curve · Manifest: /charts/time-curve.json · Tags: time curve, trajectory, state space, MDS, energy, electricity, Germany
