# Streamgraph

> Use a streamgraph to show the rise and fall of several parts over a long time, when the overall shape matters more than exact values.

- 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: **Chicken overtook pork in 2016 as the world's most produced meat** (Global meat production by animal, million tonnes, 1961 to 2024)
- How to read it: Each stream is one kind of meat; its thickness in a year is how much the world produced.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9 (best 16:9)

## Use it when
- 3 to 6 parts over many time points
- the eye should follow each part's swell and shrink
- a lively, organic view suits the audience

## Avoid it when
- readers need exact totals (the baseline moves)
- values can be negative
- only two or three time points

## Fields (data.json)
- `year` (year): the year
- `poultry` (number, unit "million tonnes", format decimal): poultry meat, million tonnes
- `pig` (number, unit "million tonnes", format decimal): pig meat, million tonnes
- `beef` (number, unit "million tonnes", format decimal): beef and buffalo meat, million tonnes
- `sheepGoat` (number, unit "million tonnes", format decimal): sheep and goat meat, million tonnes
- `other` (number, unit "million tonnes", format decimal): game, horse and camel meat, million tonnes

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 a stream to read its tonnes and share in any year
- Motion: The streams swell outward from the centre line one after another; labels fade in once they settle.
- Sound: A pop when the hovered year changes, pitched by stream. 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": "streamgraph",
  "title": "Chicken overtook pork in 2016 as the world's most produced meat",
  "subtitle": "Global meat production by animal, million tonnes, 1961 to 2024",
  "data": "/charts/streamgraph.data.json"
}
```

## Source
Global meat production by livestock type, Our World in Data (Food and Agriculture Organization of the United Nations) (CC BY 4.0), retrieved 2026-12-01: https://ourworldindata.org/grapher/global-meat-production-by-livestock-type

Note: The centre of the streams moves to keep them smooth; read thickness, not height.

Live: /charts/streamgraph · Manifest: /charts/streamgraph.json · Tags: streamgraph, stream, parts over time, food, meat, agriculture
