Skip to content
animorio
IT
Back to the library

Growth line chart

SVG, ScrollGSAPMediumCompressed weight: Demo 6.7 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

The growth chart of a made-up product, Tallyfin, in the clean style of product interfaces: the stage stays still and as you scroll the thin grid comes in, then a soft curve draws itself from left to right with a fading area under it. A small dark label rides the advancing tip, counts the growth and leans a little with the slope, with a dashed thread down to the axis; three moments of the year are marked on the curve with a tick and a line of text. At the end the curve settles by a few pixels and the headline above lights up.

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.

<!doctype html>
<!--
  "Growth line chart" from Animorio · https://animorio.com
  License: free on your own sites and your clients’ sites, paid work included.
  Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Tallyfin, revenue that keeps climbing</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- a made-up billing tool for small shops, Tallyfin. A sticky stage with a growth chart: scrolling, the curve draws
       itself from left to right, a small label rides its tip and counts the growth, and three moments of the year
       are marked on the line. At the end the curve settles and the headline above lights up -->
  <section class="corsa" data-corsa>
    <div class="palco" data-palco>
      <p class="occhiello">
        <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M2.5 12.5 6.5 8l3 2.5 4-5.5"/><path d="M10.5 5h3v3"/></svg>
        Tallyfin in 2026
      </p>
      <h2 class="titolo" data-titolo>Revenue that keeps climbing</h2>
      <p class="sotto">What 2,400 small shops earned in their first year with Tallyfin, month by month.</p>

      <figure class="carta" data-carta>
        <div class="carta__testa">
          <span class="carta__nome">Average revenue growth</span>
          <span class="carta__periodo">Jan to Dec</span>
        </div>
        <div class="grafico" data-grafico>
          <svg class="grafico__svg" data-svg aria-hidden="true">
            <defs>
              <linearGradient id="sfuma" x1="0" y1="0" x2="0" y2="1">
                <stop offset="0" class="sfuma__alto"/>
                <stop offset="1" class="sfuma__basso"/>
              </linearGradient>
              <clipPath id="taglio"><rect data-taglio x="0" y="0" width="0" height="0"/></clipPath>
            </defs>
            <g data-griglia></g>
            <g data-curva-gruppo>
              <path class="area" data-area clip-path="url(#taglio)"/>
              <path class="curva" data-curva/>
            </g>
            <line class="filo" data-filo x1="0" y1="0" x2="0" y2="0"/>
            <g data-tacche></g>
          </svg>
          <div class="mesi" data-mesi aria-hidden="true"></div>
          <div class="momenti" data-momenti aria-hidden="true"></div>
          <div class="punta" data-punta aria-hidden="true">
            <span class="punta__corpo" data-punta-corpo><b data-valore>+0%</b> revenue</span>
          </div>
        </div>
      </figure>
    </div>
  </section>
  <footer class="piede">Figures are illustrative. Tallyfin is a made-up product.</footer>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/ScrollTrigger.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/lenis@1.3.26/dist/lenis.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.

23 values to change

Or ask your AI assistant for it

With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:

Take “Growth line chart” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On a white background there is the numbers section of Tallyfin, a made-up invoicing tool for small shops: at the top a grey pill with a drawn rising arrow and the words Tallyfin in 2026, then the headline Revenue that keeps climbing, still pale grey, a line of explanation and below a white card with a thin border and a soft shadow, with the chart’s name and the period. The stage stays still as you scroll. First the five thin grid lines come in, one after the other from the left, and the month names under the axis. Then the indigo curve draws itself from January to December, soft, with an area under it that fades downwards and is revealed along with it. A small black pill rides the advancing tip with how much revenue has grown, counting from +0% to +38% in tabular figures and leaning a few degrees with the slope of the curve; a dashed thread runs from the tip down to the axis. As the tip passes May, September and November, a thin vertical tick grows on that point of the curve with a small bounce and a line of text rises above it: Team plans, Shop in Germany, Annual billing, each with its note in grey. In December the curve rises a few pixels past its place and comes back, the pill swells a little, and the headline goes from grey to ink as it gains weight. Scroll back up and everything pulls back.

How it works

The curve in pixels

The script measures the chart box, gives the SVG the same viewBox and works out the twelve month points; the curve passes through all of them with a Catmull-Rom turned into cubic Bézier curves (SMOOTH says how soft it is). The area is the same curve closed on the axis. On resize everything is rebuilt, even halfway through the scroll.

The tip moving month by month

The progress p goes from 0 to 1 and says how far the tip has got horizontally. A 240 row table turns x into length along the path, so the tip moves evenly between the months; the curve is revealed with strokeDashoffset and the area with the width of a clipPath.

The label on the tip

The pill moves to getPointAtLength of the tip; its lean is the angle between two points three pixels before and after, multiplied by TILT and kept between minus 9 and 9 degrees. The number is the tip’s height read on the chart’s scale, so it really counts what you see.

One timeline tied to the scroll

A single paused timeline: the grid and the months, then the curve’s progress, the three ticks and their lines where the tip reaches them, and at the end the settle and the headline lighting up. A ScrollTrigger with scrub ties it to the stage’s run, with Lenis for smooth scrolling.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the whole chart takes: 2 is twice as long.
GROWTHscript.js38The growth at the end of the year, in percent: the number the label reaches.
TILTscript.js0.35How much the label leans with the slope of the curve (0 never).
SMOOTHscript.js0.5How soft the curve is between months (0 straight lines).
SCRUBscript.js0.6How far the chart lags behind the scroll, in seconds.
SETTLEscript.js6How many pixels the curve overshoots before it settles at the end.

Try them in the Playground

When to use it

For the numbers section of a landing page or a yearly report: whoever scrolls sees the growth build up month by month, with the milestones that pushed it, instead of a finished chart.

On phones

The same animation with adapted sizes: the headline and the chart are sized on height too and all fit in the stage, every other month is shown under the axis, the milestone lines get smaller.

With reduced motion

No motion: the chart is already fully drawn, with the label at +38%, the three ticks and their lines, and the headline lit.

Pitfalls

  • With vector-effect: non-scaling-stroke and a stretched viewBox the curve’s dash draws only halfway: the viewBox is always as large as the box in pixels, and is rebuilt on resize.
  • Length along the path does not grow evenly with x: without the table the tip would rush on the slopes and slow down on the flat bits.
  • The pill’s rotation and its half-width shift are both in GSAP (xPercent): a translate written in the CSS would be wiped by its transform.

Libraries

GSAP 3.15.0, ScrollTrigger 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 6.7 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.

Testing

Tested on 26 October 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.

All animations