Opus Motion ★ Star on GitHub

Data · stacked-area-flow

Stacked area flow

A smooth stacked area chart (or centred streamgraph) revealed left to right by a wipe: layers swell over the timeline, a dashed scrubber follows the reveal edge with a running total, the legend values count with it, and the axis and gridlines sit quietly behind.

A free, MIT-licensed animated chart from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

Stacked area flow: three frames of the animated chart, start, middle and end
Stacked area flow — start, middle and end of the 7.0-second motion.

What Stacked area flow is for

Composition over time: revenue by product line, traffic by source, energy mix, users by plan, time spent by activity. Replace xLabels and series; set baseline "center" for a streamgraph look.

  • stacked area
  • streamgraph
  • area chart
  • chart
  • data
  • composition
  • timeline
  • trend
  • infographic
  • count-up
  • legend
  • overlay

Details

Category
Animated charts & data visualisation
Length
7.0 s (210 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
yes
Seamless loop
no
Text props
title subtitle prefix
Colour props
colors background ink
Mood
hud
Roles
accent, subject

Use Stacked area flow in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add stacked-area-flow --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render stacked-area-flow --props '{"title":"Where growth comes from","subtitle":"Revenue by line, millions","prefix":"$","colors":["#2F6FED","#16B39A","#F2B134","#FF7A45","#8E5CF0","#E5487F"],"background":"#0F1722","ink":"#EEF2F7"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export stacked-area-flow --as webm-alpha --props '{"title":"Where growth comes from","subtitle":"Revenue by line, millions","prefix":"$","colors":["#2F6FED","#16B39A","#F2B134","#FF7A45","#8E5CF0","#E5487F"],"background":"#0F1722","ink":"#EEF2F7"}'

React / Next.js

tsx
import {MotionPlayer} from 'opus-motion-library/web';

<MotionPlayer
  motion="stacked-area-flow"
  props={{
    title: 'Where growth comes from',
    subtitle: 'Revenue by line, millions',
    prefix: '$',
    colors: ['#2F6FED', '#16B39A', '#F2B134', '#FF7A45', '#8E5CF0', '#E5487F'],
    background: '#0F1722',
    ink: '#EEF2F7',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

html
<script src="opus-motion.element.js" defer></script>

<opus-motion motion="stacked-area-flow"
  props='{"title":"Where growth comes from","subtitle":"Revenue by line, millions","prefix":"$","colors":["#2F6FED","#16B39A","#F2B134","#FF7A45","#8E5CF0","#E5487F"],"background":"#0F1722","ink":"#EEF2F7"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "stacked-area-flow",
      "props": {
        "title": "Where growth comes from",
        "subtitle": "Revenue by line, millions",
        "prefix": "$",
        "colors": [
          "#2F6FED",
          "#16B39A",
          "#F2B134",
          "#FF7A45",
          "#8E5CF0",
          "#E5487F"
        ],
        "background": "#0F1722",
        "ink": "#EEF2F7"
      }
    }
  ]
}

Stacked area flow props

18 parameters — change any of them to make the motion yours.

PropDefaultWhat it does
xLabels["2019","2020","2021","2022","2023","2024"]labels along the x axis (years, months, ...)
series[{"name":"Subscriptions","values":[40,52,66,80,96,118]},{"name":"Services","values":[24…layers bottom to top [{name, values[] (one per x label), color?}]
baseline"zero""zero" = stacked area from the axis, "center" = streamgraph centred on the middle
title"Where growth comes from"headline (empty = none)
subtitle"Revenue by line, millions"small line under the headline (empty = none)
prefix"$"text before numbers, e.g. "$"
suffix"M"text after numbers, e.g. "M"
decimals0decimal places on the readouts
showGridtruehorizontal gridlines with value labels (zero baseline only)
showLegendtruelegend with live values, beside (16:9) or below (1:1, 9:16)
showScrubbertruedashed line and running total that follow the reveal edge
totalLabel"Total"word before the running total (empty = number only)
colors["#2F6FED","#16B39A","#F2B134","#FF7A45","#8E5CF0","#E5487F"]palette for series without their own colour
background"#0F1722"page colour, or "transparent"
ink"#EEF2F7"text and grid colour
fontFamily""CSS font family (empty = Space Grotesk)
startAt10frame the reveal starts
speed1animation speed multiplier

Notes & credits

Technique sources:

  • original round-3 chart motion