StreamgraphLayers that flow around a centre.
Smooth layers stacked around a centre line, not on a flat floor. Many series swell and shrink like a river, made for the feel of change.
- Answers How did it change?
- Your data many series over time
- Layers about 4 to 12
- Value axis none
- Excel and Power BI a custom visual
- Pop
- Rock
- Hip hop
- Jazz
- Classical
What is a streamgraph?
A streamgraph is a stacked area chart built around a centre line instead of a zero line, with smooth edges and no value axis. The thickness of each layer is its value, and the total stream swells and narrows over time. It shows the rise and fall of many series at once, as a shape to take in rather than numbers to read.
A music app counts the songs played per month by genre. A streamgraph shows pop as a steady wide band, rock thinning out, and hip hop swelling in the summer: the feel of a year in music, in one picture.
Why use a streamgraph?
Because it shows many series rising and falling, as one shape.
- Many layers fit. Smooth layers around a centre handle more series than a stacked area.
- The flow shows. Which series swell when, and which fade.
- Striking. It draws the eye, for a story told at a glance.
- No jumpy base. No layer sits on a flat floor that all others must follow.
How does a streamgraph work?
Three steps turn stacked layers into a stream.
- Step 1 of 3Stacked from zeroThe genres piled up on a flat floor.
- Pop
- Rock
- Hip hop
- Jazz
- Step 2 of 3Moved to the centreThe pile is centred on a middle line, so it spreads up and down evenly.
- Pop
- Rock
- Hip hop
- Jazz
- Step 3 of 3Smooth edgesCurved edges turn the steps into a stream.
- Pop
- Rock
- Hip hop
- Jazz
What are the parts of a streamgraph?
Four parts, and each one has a job.
- Pop
- Rock
- Hip hop
- Jazz
- Layerone series; its thickness is its value
- Centre linethe stream is balanced around it
- Total widthall series together at one moment
- Time axisthe moments, left to right
How do you read a streamgraph?
Three looks, in this order.
- Read the total widthThe stream is widest in July: the most songs played.
- Pop
- Rock
- Hip hop
- Jazz
- Classical
- Follow one layerHip hop swells in summer and shrinks in autumn.
- Pop
- Rock
- Hip hop
- Jazz
- Classical
- Read thickness, not positionRock moves up and down with the layers around it; only its thickness counts: it thins out.
- Pop
- Rock
- Hip hop
- Jazz
- Classical
What kinds of streamgraph are there?
The same layers, three ways.
- Kind 1StreamgraphCentred and smooth.
- Pop
- Rock
- Hip hop
- Jazz
- Kind 2One litFade the rest to follow one series.
- Pop
- Rock
- Hip hop
- Jazz
- Kind 3Stacked areaOn a flat floor, with a value axis.
- Pop
- Rock
- Hip hop
- Jazz
When should you use a streamgraph?
When the feel of many series changing matters more than exact values.
- there are many series over many moments
- the overall flow and the big swells are the story
- the audience wants a striking picture
- exact values are not needed
- exact values matter (a line chart or a stacked area)
- there are only 2 or 3 series (a stacked area)
- values can be negative (a line chart)
- readers must compare layers precisely (small multiples)
Streamgraph or stacked area chart?
The stream for the feel, the stacked area for the numbers.
- Pop
- Rock
- Hip hop
- Jazz
- Pop
- Rock
- Hip hop
- Jazz
The stacked area sits on zero and has a value axis, so the total and the bottom layer read exactly. The streamgraph trades that for balance and flow: it is easier on the eye with many layers, but no layer can be read off a scale.
How do you make a streamgraph?
A custom visual in Power BI; code in Python.
Excel has no streamgraph; a stacked area chart is the nearest. In Power BI, streamgraphs come as custom visuals from AppSource. In Python, matplotlib draws one with plt.stackplot(x, ys, baseline='wiggle'), and D3 has a stack offset for it in the browser.
What goes wrong with streamgraphs?
The most common mistake, and its fix: reading a layer's position as its value.
- a layer rises on the page because the layers below grew
- the reader thinks it grew
- only the distance between a layer's two edges is its value
- say so in one line under the title
| Mistake | Why it hurts | Fix |
|---|---|---|
| Reading a layer's height on the page | Position comes from the layers below | Read thickness only |
| Expecting exact numbers | There is no value axis | A stacked area or a line chart |
| Too few series | A stacked area is clearer | Four or more series |
| Too many colours with no order | The stream turns into noise | Order layers, group small ones |
| Labels far from layers | Readers match colours to a key | Name layers inside the stream |
Every chart for “How did it change?”
- LinesLine chartPoints in time joined by a line, for the shape of a trend.
- LinesStep chartA line that jumps and holds, for values that change at moments, like prices.
- LinesSparklineA tiny line without axes next to a number, for the trend at a glance.
- LinesIndex chartEvery line starts at 100, so growth compares fairly across sizes.
- LinesSlope chartTwo moments and a line per item, to see who rose and who fell.
- LinesConnected scatter plotTwo measures over time, the points joined in the order they happened.
- AreasArea chartA line chart with the space below filled, for amounts over time.
- AreasStacked area chartLayers stacked over time, for a total and the parts that build it.
- Areas100% stacked area chartLayers that always fill the height, for shares over time.
- AreasHorizon chartA line chart folded into bands of colour, for many series in little space.
- Columns and linesCombo chartColumns and a line on one chart, for an amount and a rate together.
- Rank over timeBump chartRanks over time, one line per item, to follow who moves up and down.
- Rank over timeRibbon chartStacked columns joined by ribbons, the largest always on top.
- Patterns in timeCalendar heatmapEvery day a square on a calendar grid, busy days darker.
- Patterns in timeCycle plotEach month or weekday as its own little line, for seasons.
- PricesCandlestick chartOpen, high, low and close for each period, the way prices are shown.
- EventsTimelineEvents placed on a line in the order they happened.
Read on, step by step.
Does it fit your data? Try it.
Paste your table into Chart Compass, say what the chart should show, and see the charts that fit, drawn with your own numbers. It runs in your browser, so the data stays with you.