Skip to content
animorio
IT
Back to the library

Analytics chart loader

SVG, HoverGSAP, CSS onlyMediumCompressed weight: Demo 10 KBGSAP 28 KBFreeDownload the zip

The loader of Quorra, a made-up analytics app: on a white card the twelve data points fall onto the grid one after the other like drops, with a small bounce and a shadow that tightens; then a line sews them from left to right, pulls tight like a thread and settles. The area fills with a soft indigo, the number rolls up on its reels, the «+18.4%» pill arrives and the card opens for the months. Over the chart a crosshair follows the line with the tooltip of the point.

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>
<!--
  "Analytics chart loader" 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>The analytics app loader with falling points and the line that sews them</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/geist-mono@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage" data-stage>
    <!-- the loading screen of a made-up analytics app, Quorra. The data points fall onto the grid one after the other
         like drops, a line sews them from left to right, pulls tight like a thread and settles; the area fills, the
         number rolls up, the growth arrives in a pill, the card opens a little for the months. Over the chart a
         crosshair follows the line with the tooltip of the point -->
    <section class="card" data-card aria-label="Quorra analytics, active users" aria-busy="true">
      <span class="card__rim" aria-hidden="true"></span>
      <span class="card__shine" aria-hidden="true"></span>

      <header class="head">
        <span class="brand">
          <svg class="brand__mark" viewBox="0 0 22 22" aria-hidden="true">
            <rect x="0.75" y="0.75" width="20.5" height="20.5" rx="6.5"/>
            <path d="M5.6 14.6l3.6-4 3 2.4 4.2-5.4"/>
          </svg>
          <span class="brand__name">Quorra</span>
        </span>
        <span class="status" data-status>
          <svg class="status__icon" viewBox="0 0 16 16" aria-hidden="true">
            <circle class="status__track" cx="8" cy="8" r="5.6"/>
            <path class="status__arc" data-arc d="M8 2.4a5.6 5.6 0 0 1 5.6 5.6"/>
            <path class="status__check" data-check d="M5.2 8.3l1.9 1.9 3.8-4"/>
          </svg>
          <span class="status__slot">
            <span class="status__text" data-status-a>Syncing data</span>
            <span class="status__text" data-status-b>Updated just now</span>
          </span>
        </span>
      </header>

      <div class="kpi">
        <p class="kpi__label">Active users, last 12 months</p>
        <div class="kpi__row">
          <span class="value" data-value aria-hidden="true"></span>
          <span class="sr" data-sr>48,210 active users, up 18.4 percent</span>
          <span class="pill" data-pill aria-hidden="true">
            <svg class="pill__arrow" viewBox="0 0 12 12"><path data-pill-arrow d="M6 9.6V2.6M2.9 5.6L6 2.5l3.1 3.1"/></svg>
            <span data-gain>+18.4%</span>
          </span>
        </div>
      </div>

      <div class="chart" data-chart>
        <svg class="chart__svg" data-svg viewBox="0 0 320 150" aria-hidden="true">
          <defs>
            <linearGradient id="q-area" x1="0" y1="0" x2="0" y2="1">
              <stop offset="0" stop-opacity="0.2"/>
              <stop offset="0.65" stop-opacity="0.05"/>
              <stop offset="1" stop-opacity="0"/>
            </linearGradient>
            <clipPath id="q-clip"><rect data-clip x="0" y="150" width="320" height="150"/></clipPath>
          </defs>
          <g class="grid" data-grid></g>
          <path class="area" data-area clip-path="url(#q-clip)" fill="url(#q-area)"/>
          <g class="cross" data-cross>
            <line class="cross__line" x1="0" y1="6" x2="0" y2="140"/>
          </g>
          <path class="line" data-line/>
          <path class="glint" data-glint/>
          <g data-shadows></g>
          <g data-points></g>
          <g class="marker" data-marker>
            <g data-marker-in>
              <circle class="marker__halo" data-halo r="7.5"/>
              <circle class="marker__dot" r="3.6"/>
            </g>
          </g>
        </svg>
        <div class="tip" data-tip aria-hidden="true">
          <div class="tip__box">
            <span class="tip__m" data-tip-m>Aug</span>
            <span class="tip__v" data-tip-v>46.1k</span>
          </div>
        </div>
      </div>

      <div class="months" data-months aria-hidden="true">
        <div class="months__row" data-months-row></div>
      </div>
    </section>

    <svg class="cursor" data-cursor viewBox="0 0 24 24" aria-hidden="true"><path d="M5 2.8v16.4l4.2-4 2.8 6.2 2.9-1.3-2.8-6.1h5.9Z"/></svg>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.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.

53 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 “Analytics chart loader” 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 warm white page sits the card of Quorra: the mark, the «Syncing data» pill with a spinning arc, the line «Active users, last 12 months» and the number still grey. The dashed lines of the grid stretch in from the left with the 40k, 45k, 50k labels; then the twelve points fall one after the other, 0.11 s apart: they stretch as they fall, squash as they touch the grid, bounce a few pixels and settle with an elastic wobble, while under them a shadow tightens and darkens like the shadow of an arriving drop. Meanwhile the digits of «48,210» spin on their reels and turn black. Then an indigo line sews the points from left to right with a stroke that draws itself, a little slack like a thread: each point it reaches turns indigo with a small jolt. At the end the thread pulls tight, goes one pixel past, settles, and the points rise a hair with it; below, the area fills from the bottom with a soft indigo gradient and a white glint runs along the line. The «+18.4%» pill arrives with its arrow drawing itself, the status turns to «Updated just now» with a check, and the card opens a little: the months from Jan to Dec rise one after the other. Over the chart a dashed vertical crosshair springs from point to point with the black tooltip of the month and value; the point and the month below light up. Left alone, a pointer sweeps the chart from Mar to Dec, leaves, and the loading starts again.

How it works

The grid and the points in SVG

One SVG with viewBox 0 0 320 150 and width 100%: it grows without stretching. The grid lines and labels come from the values (one line every 5k), the twelve points are a g placed with translate and inside it a second g that GSAP moves: the fall and the squash never touch the position.

The falling drop

Each point starts 46 units higher, stretched (scaleY 1.22), and falls in DROP_TIME on power3.in; it lands and squashes (scaleX 1.3, scaleY 0.7) in 0.07 s with transformOrigin at the bottom, bounces by BOUNCE on power2.out, drops again and settles on elastic.out. The shadow is an ellipse under the point: rx from 9 to 3.2 and the opacity rising as the drop arrives, a little wider at the bounce.

The thread that sews

The line is a Catmull-Rom turned into Bézier curves; SAG is added to the control points, so between two points it hangs like a thread. It draws with stroke-dasharray and stroke-dashoffset from the length to zero in DRAW_TIME (sine.inOut). The line is sampled first with getPointAtLength to know at which share of its length each point sits, and inverting the ease tells when to sew it.

The tension and the area

Once drawn, SAG goes to -0.22 times itself in 0.2 s and back to zero on elastic.out(1, 0.38): the path is rebuilt on every frame and the thread pulls tight, goes past and settles. The area uses the same path closed at the bottom, with an indigo gradient and a clipPath whose rectangle rises from below. A second white path with dasharray 16 2000 runs the glint.

The digits and the pill

Each digit is a column 0-9 repeated three times behind a window with overflow: hidden: it goes to yPercent -(20 + digit) x 100 / 30, two full turns and the digit, in ROLL_TIME on power4.out, staggered; a wrapper rises one pixel and comes back. The pill comes in on back.out(2.4) from scale 0.6 and its arrow draws with stroke-dashoffset.

The crosshair and the tooltip

The pointer over the chart looks for the nearest point in x; the crosshair, the ring and the tooltip go there with gsap.quickTo (0.42 s, power3.out). GSAP moves the tooltip and the CSS centres its box, kept inside the chart by measuring its width at every change. Alone, a fake pointer sweeps the chart, then the card empties and the loading starts again.

Values to change

NameFileDefaultWhat it changes
DATAscript.js40.7 … 48.2The values of the chart, one per month, in thousands (up to twelve).
TOTALscript.js48,210The number on top, rolled digit by digit.
GAINscript.js+18.4%The growth in the pill.
DROP_GAPscript.js0.11Seconds between one falling point and the next.
DROP_TIMEscript.js0.42Seconds a point takes to fall onto the grid.
BOUNCEscript.js4How high a point bounces after landing.
DRAW_TIMEscript.js1.5Seconds the line takes to sew all the points.
SAGscript.js7How slack the thread is before it pulls tight.
ROLL_TIMEscript.js1.6Seconds the digits of the number take to roll.
HOLDscript.js1.4Seconds the finished chart rests before loading again.
LOOPscript.jstrueLeft alone, it loads, sweeps the chart and loads again, over and over.

Try them in the Playground

When to use it

For the loading state of a dashboard, an analytics or stats app, a sales panel or a growth widget: while the data arrives the card is not empty but shows it arriving. The finished chart, with its crosshair and tooltip, also works on its own on a SaaS product page.

On phones

The same animation with adapted sizes: the card is at most as wide as the box, text and spacing with clamp and min(vw, vh), the chart is an SVG that grows without stretching. A finger taps or drags over the chart: the crosshair goes to the nearest point and the tooltip stays a moment after the finger lifts.

With reduced motion

No falls, no thread, no reels: the card fades in with the chart already finished, the line, the area, the number, the pill and the months in place. The crosshair and the tooltip fade in and out without sliding. No pointer on its own.

Pitfalls

  • The squash of a drop wants its origin at the bottom: with transformOrigin at the centre the point would squash in mid air and seem to sink into the grid.
  • The position of the point and its motion sit on two different g elements: GSAP writes the transform of the moving g, and on the same element it would wipe out the translate that places it.
  • stroke-dasharray is set for the length of the slack thread: when the thread pulls tight the length changes, so once drawn the dasharray is removed, or a gap would appear at the end.
  • The moment the stroke reaches a point is not proportional to time, because the drawing has an ease: the share of the length is found and passed through the inverse of the ease (a binary search).
  • With tabular-nums digits all the same width the reel does not change width while spinning; and reel rows taller than the glyph keep the next digit from showing under the right one.
  • A crosshair following the pointer pixel by pixel shakes between two points: here it snaps to the nearest point with a short spring, and the tooltip is kept inside the chart at both edges.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, Geist Mono (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 10 KB; the libraries: GSAP 28 KB.

Testing

Tested on 13 November 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