
Line Graph Animation
A white revenue chart grows twelve bars from the baseline. Each bar shrinks to a dot at its top, a line draws left to right through the dots with a soft fill behind the pen, and a bubble over the last point counts up to $184.2k with a +38% chip.
Motionboard shot: Bars to Line
Seen in real launch films
How to make a Line Graph Animation with Claude Code or Codex
Copy the recipe above and paste it into Claude Code or Codex. The agent installs the skill and builds the shot.
npx skills add krisyangdev/motionboardHow it's built
Keep one set of twelve values for the whole move. The 1500x870px card holds a 1300x540px plot with a $0–$240k scale; each bar is 60px wide and value / 240 × 540px high. Bars grow from 1.25s, 0.065s apart, 0.95s each with power3.out. At 3.5s every bar shrinks to a 26px dot centred on its own top over 0.8s with power3.inOut: height to 26px, bottom to the bar height minus 13px, all four radii to 13px, colour to the accent #3b5bfd, and a 5px white ring around it.
Draw the line as one SVG path through the dot centres, 7px with round caps, using stroke-dasharray equal to the path length. From 4.5s to 5.9s one proxy tween with power2.inOut sets the dash offset, the clip width of a gradient area under the line (30% to 2% accent) and the position of a 10px pen dot, all from the same progress value. Scale each dot up to 1.5x while the pen is within 150px past it. Hide the line, the area and the pen in CSS until 4.5s, because a round cap paints a dot at the path start even at full dash offset.
Press the copy button to send this recipe to Claude Code or Codex, or install the skill once with npx skills add krisyangdev/motionboard. The agent builds the card, the axes and the path. At 5.95s a dark 500x112px bubble pops over the last point with back.out(1.5), $184.2k counts up at 78px from 6.0s to 6.75s and a +38% chip lands at 6.55s. The card clears at 7.2s and the lockup holds from 8.75s. Render an MP4 with HyperFrames, or port the GSAP timeline to your website.
Full recipe
Why it works
The same twelve values stay on screen for the whole move, so the viewer watches one chart change type instead of reading a second chart. Each bar shrinks toward its own top until it is a dot, which puts every dot exactly where the line will pass; the line then joins points the eye has already read. One eased progress value drives the stroke, the area fill and the pen, so the gradient never runs ahead of the line, and each dot pulses as the pen reaches it, so the stroke seems to pick the dots up. The headline number arrives after the line stops: a dark bubble over the last point with $184.2k at 78px counting up, then the +38% chip. It is the largest element on the frame and the only dark one on a white card, so the eye lands on it. One accent, blue #3b5bfd, marks the line, the dots and the latest bar; the earlier bars are a pale tint of the same blue. The finished chart holds about 1.25s before the card clears, and the lockup follows on clean paper.
Spec
- Timing
- Film 11s. Card rises 0.1–1.1s; title 0.4s, range pill 0.5s; gridlines draw from 0.55s (0.9s each, 0.06s stagger), y labels from 0.65s, month labels from 0.85s; 12 bars grow from 1.25s, 0.065s apart, 0.95s each (last done at about 3.0s); hold 0.5s; bars shrink to dots from 3.5s, 0.035s apart, 0.8s each (done at 4.7s); pen and line appear at 4.5s and draw 4.5–5.9s (1.4s); pen fades 5.95–6.3s; last dot grows and a ring expands from 5.85s; value bubble pops at 5.95s (0.65s), the number counts 6.0–6.75s, the +38% chip pops at 6.55s (0.55s); card leaves 7.2–7.7s; lockup mark 7.8s (0.8s), wordmark 7.9s (0.85s), tagline 8.0s (0.75s), held still to 11s
- Easing
- Card rise and lockup
expo.out; gridlines and bar growth power3.out; bar-to-dot morph power3.inOut; line, area and pen share one power2.inOut progress; bubble back.out(1.5), chip back.out(1.8); value count power3.out; card exit power2.in; the slow card drift is linear (none) - Camera
- Flat, straight-on framing; the whole card drifts from scale 1 to 1.03 over 0.2–7.6s in a linear move, so the chart is never fully still
- Subject
- Card 1500x870px, white, corner radius 32px, at left 210px and top 105px; plot area 1300x540px at (140, 200) inside it, scale $0–$240k with gridlines every $60k and 28px axis labels; 12 slots of 108.33px, bars 60px wide with height = value / 240 × 540, values in $k: 96, 103, 101, 114, 122, 119, 133, 146, 151, 163, 171, 184.2; bars a pale tint
#c9d2fb, December solid accent; dots 26px with a 5px white ring; line 7px with round caps through the dot centres (Catmull-Rom to cubic Bézier); area gradient from 30% to 2% accent; pen a 10px white dot with a 5px accent stroke; value bubble 500x112px, radius 26px, text 78px/800, chip 32px/700 - Sync
- The line, the area clip and the pen come from one progress value on the same frame; each dot scales up to 1.5x while the pen is within 150px past it; the last dot grows to 1.3x and its ring starts at 5.85s, 0.1s before the bubble; the number reaches 184.2 at 6.75s, 0.2s after the chip appears
- Style
- Paper
#eceef1with a soft radial lift, ink#14161a, one accent#3b5bfd, chip green#4ade80; Inter throughout, title 48px/700, wordmark 150px/700, tagline 40px; light vignette and 6% multiply grain
Prompt
Build an 11-second, 1920x1080, 30 fps light product film called Bars to Line for a fictional product, Ledger (a revenue analytics dashboard). Background paper #eceef1 with a soft radial lift in the centre, ink #14161a, one accent blue #3b5bfd, font Inter. Use HTML and one paused GSAP timeline; every change comes from the timeline, with no CSS animations. Hide everything that appears later in CSS (opacity 0) and tween to explicit end values. Chart card: 1500x870 px, white, radius 32 px, soft shadow, at left 210 and top 105. Title Monthly recurring revenue (48 px, 700) top left and a Jan – Dec 2025 pill (26 px) top right. Plot area 1300x540 px at (140, 200) inside the card, scale $0–$240k with gridlines every $60k (28 px grey labels on the left) and twelve month labels Jan–Dec (28 px) under the baseline. Values in $k: 96, 103, 101, 114, 122, 119, 133, 146, 151, 163, 171, 184.2. Slot width 108.33 px; bars 60 px wide, height = value / 240 × 540, pale tint #c9d2fb, December solid #3b5bfd. Timeline: the card rises 0.1–1.1 s (y 70 to 0, scale 0.97 to 1, expo.out). Title at 0.4 s, pill at 0.5 s. Gridlines draw left to right from 0.55 s (0.9 s power3.out, 0.06 s stagger), y labels fade in from 0.65 s, month labels from 0.85 s. Bars grow from the baseline from 1.25 s, 0.065 s apart, each 0.95 s power3.out; hold 0.5 s. At 3.5 s every bar shrinks to a 26 px dot centred on its own top (0.8 s power3.inOut, 0.035 s stagger): height to 26, bottom to bar height minus 13, width to 26, all four radii to 13, colour to #3b5bfd, and a 5 px white ring grows around it. Build the line as one SVG path through the dot centres (Catmull-Rom converted to cubic Béziers), 7 px, round caps, stroke-dasharray equal to the path length, plus an area path under it filled with a vertical gradient of the accent from 30% to 2% opacity and clipped by a rect that follows the pen. Hide the line, the area and the pen in CSS and show them at 4.5 s. From 4.5 to 5.9 s one proxy tween (power2.inOut) sets the dash offset, the clip width and the pen position from getPointAtLength; the pen is a 10 px white dot with a 5 px accent stroke. In the same update scale each dot up to 1.5x while the pen is within 150 px past it. The pen fades at 5.95 s (0.35 s). From 5.85 s the December dot grows to 1.3x and a 60 px accent ring expands to 2.6x while fading (0.9 s). At 5.95 s a dark bubble (500x112 px, #14161a, radius 26 px, a rotated 26 px square as the pointer) pops in above the December point with back.out(1.5) over 0.65 s. Its text $184.2k (78 px, 800, tabular numerals) counts up from 0 over 0.75 s from 6.0 s (power3.out); a +38% chip (32 px, 700, #4ade80 on 16% green) pops in at 6.55 s. The card drifts from scale 1 to 1.03 linearly over 0.2–7.6 s and fades up and out at 7.2 s (0.5 s power2.in). Lockup from 7.8 s on clean paper: a 150 px accent tile (radius 36 px) pops in over 0.8 s (expo.out), a white ascending polyline with an end dot draws inside it from 7.85 s (0.6 s), the word Ledger (Inter 700, 150 px) rises from a mask at 7.9 s (0.85 s expo.out) and the tagline Revenue, clear at a glance. (40 px grey) fades up at 8.0 s. Hold still to 11 s. Add a light vignette and 6% multiply film grain.
People describe it as
- Bars shrink into dots and a line draws through them
- The bar chart turns into a line graph with a filled area
- A big revenue number pops out at the end of the line
Often confused with
- Count Up AnimationCount Up Animation rolls digits to a target number; here the numbers are bar heights that change into a line, and only the last value counts up.
- Morph TransitionMorph Transition turns one element into the next to avoid cuts; here one chart keeps its twelve values and changes from bars to dots to a drawn line.
FAQ
What is a line graph animation in a product film?
A line graph animation draws a data line across a chart, usually left to right, so the viewer watches the trend form. In this film the chart starts as bars, the bars become dots, and the line draws through the dots, so the same twelve values show up in three forms.
How do you turn bars into a line?
Shrink each bar toward its own top until it is a dot, so the dot ends up on the value. Then draw one SVG path through the dot centres with stroke-dashoffset. Drive the stroke, the area fill and the pen from one eased progress value so they never drift apart.
Is it free to use?
Yes. Motionboard is free and MIT licensed, so you can use and modify the recipes and the films they produce in personal and commercial projects. The licence asks only that copies of the recipe files keep the copyright notice.








