
The colour columns
Hover, SVG
The monitoring card of a service, light and product grade: the latency line scrolls live from the right and the big number follows it. When a spike crosses the dashed threshold, the part above turns red, a small flag is planted where it crossed and travels away with the data, the status pill flips to ‘Degraded’ and the alert count rolls; then everything goes green again. Under the pointer a hairline reads any moment of the line.
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>
<!--
"Live latency 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>The live latency chart with a spike that trips the alert threshold</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>
<main class="stage">
<!-- the latency card of a monitoring dashboard: the line scrolls live from the right while the number follows it;
when a spike crosses the dashed threshold the part above turns red, a flag is planted where it crossed and
travels away with the data, the status pill flips to Degraded and the alert count rolls; then it recovers.
Under the pointer a hairline reads any moment of the line -->
<article class="card" data-card aria-label="Latency of the checkout API, live">
<header class="head">
<span class="service">
<svg class="service__mark" viewBox="0 0 20 20" aria-hidden="true"><path d="M3 10h3.4l2-5.4 3.2 10.8 2-5.4H17"></path></svg>
checkout-api
</span>
<span class="status" data-status>
<svg class="status__icon" viewBox="0 0 14 14" aria-hidden="true">
<path class="status__ok" d="M3.2 7.4 5.9 10 10.8 4.4"></path>
<path class="status__bad" d="M7 3.4v4.4M7 10.4v.2"></path>
</svg>
<span class="status__roll"><span class="status__word" data-status-word>Healthy</span></span>
</span>
</header>
<div class="read">
<span class="read__n"><span data-ms>0</span><small>ms</small></span>
<span class="read__label">p95 latency, live</span>
</div>
<div class="chart" data-chart>
<svg class="chart__svg" data-svg role="img" aria-label="Line chart of the latency over the last seconds">
<defs>
<linearGradient id="lat-area" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="var(--accent)" stop-opacity="0.2"></stop>
<stop offset="1" stop-color="var(--accent)" stop-opacity="0"></stop>
</linearGradient>
<linearGradient id="lat-hot" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="var(--alert)" stop-opacity="0.26"></stop>
<stop offset="1" stop-color="var(--alert)" stop-opacity="0.04"></stop>
</linearGradient>
<clipPath id="lat-below"><rect data-clip-below></rect></clipPath>
<clipPath id="lat-above"><rect data-clip-above></rect></clipPath>
<clipPath id="lat-wipe"><rect data-clip-wipe></rect></clipPath>
</defs>
<g data-grid class="chart__grid"></g>
<g clip-path="url(#lat-wipe)">
<g clip-path="url(#lat-below)">
<path class="chart__area" data-area fill="url(#lat-area)"></path>
<path class="chart__line" data-line></path>
</g>
<g clip-path="url(#lat-above)">
<path class="chart__area" data-area-hot fill="url(#lat-hot)"></path>
<path class="chart__line chart__line--hot" data-line-hot></path>
</g>
<g data-flags></g>
<rect class="chart__head" data-head width="3" height="13" rx="1.5"></rect>
</g>
<line class="chart__limit" data-limit></line>
<line class="chart__hair" data-hair></line>
<rect class="chart__mark" data-mark width="3" height="13" rx="1.5"></rect>
</svg>
<span class="limit" data-limit-tag><span data-limit-text>Alert at 300 ms</span></span>
<div class="tip" data-tip aria-hidden="true"><b data-tip-n>142 ms</b><span data-tip-t>8 s ago</span></div>
</div>
<footer class="foot">
<span>Region <b>eu-west</b></span>
<span class="foot__alerts">Alerts today <b class="foot__n"><span data-alerts>2</span></b></span>
</footer>
</article>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></path></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>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.
25 values to change
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 “Live latency chart” from Animorio and fit it into my siteEverything depends on one number, the data time, which advances every frame. Each sample has an index; its x is the width minus (now minus index) times the pitch, so the line scrolls smoothly between samples too, and the last point, on the right, is interpolated at the exact instant.
Every frame the visible points become an SVG path of Bézier curves (Catmull-Rom: each handle is a sixth of the distance between the two neighbours). The same path, closed at the bottom, makes the fade.
The line is drawn twice with the same path: a green one clipped by a clipPath below the threshold, a red one clipped above. So the change of colour falls exactly on the dashed line, with no intersections to compute.
Among the visible samples the code looks for pairs going from below to above the threshold: there, with an interpolation, the flag is planted. It has no state: its position is worked out every frame from the data, and its height depends on the seconds since the crossing, with a spring that dies out.
When the head of the line goes over the threshold, the card takes the is-bad class: one CSS variable changes pill, number, shadow and tag. The pill’s word and the alert count leave and come back with back.out; the tag takes a knock with elastic.out. The status is good again 0.9 seconds after the line has come down.
From the pointer’s x the code goes back to the fractional index of the sample and its value: hairline, bar and label read the line while it scrolls underneath. The label stays inside the sides and goes below the line when there is no room above.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #0e9f8a | The colour of the line when all is well. |
ALERT | script.js | #f0442e | The colour above the threshold. |
THRESHOLD | script.js | 300 | The alert threshold, in milliseconds. |
PEAK | script.js | 430 | How high the spike goes, in milliseconds: below the threshold, the alert never trips. |
SPEED | script.js | 4.5 | How many samples a second: higher makes the line run faster. |
EVERY | script.js | 11 | How many seconds between one spike and the next. |
LOOP | script.js | true | Left alone, a pointer reads the line between one spike and the next. |
For the dashboard of a monitoring tool, a cloud service or a developer app, and for a product’s status page: the card that shows a live number and what happens when it goes over the limit. Also good on the product page as a showpiece.
The same animation with adapted sizes: the pitch between samples tightens, the chart height follows the window’s and the number gets smaller. Touching and dragging on the chart the hairline follows the finger.
The line does not scroll: the chart stands still on a moment with a spike already past, red above the threshold and with its flag. The hairline under the pointer works without easing.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.5 KB; the libraries: GSAP 28 KB.
Tested on 13 November 2026
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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.