Live data should breathe
A chart that updates every second is a different object from one that updates once. Notes on easing, a scale that glides, and a head that shows it is alive.
Most charts are made to be read once: you load the page, the line is there, you take in the shape. A live chart is something you watch. It changes while your eyes are on it, and every change is either calm or a jolt.
Never snap
The first rule is the simplest: when a new value arrives, the line doesn't jump to it. It eases there, closing about eight percent of the gap each frame. That one change is the difference between a chart that flickers and one that feels like it's following something real.
The scale matters as much as the line. When a value breaks out of the range, a naive chart rescales instantly and every point on screen jumps to a new height. Easing the range too means the whole picture settles into its new frame instead.
Show that it's alive
A static chart and a live one look identical in a screenshot, so the live one needs a tell. Here it's a soft ring that leaves the head every 1.6 seconds, a tag on the right edge that reads the value at the height of the line, and a tint: green when it's heading up, red when down, the accent when it's flat.
- Follow
- 8% of the gap per frame, frame-rate independent
- Range
- glides at 10% per frame, 18% padding
- Head ring
- every 1.6 s, off with reduced motion
- Drawing
- one canvas; stops when off screen
- Scrub
- nearest point, value and time
If it doesn't move, it's a report. If it moves badly, it's a slot machine.
Two more decisions you won't notice: the chart stops drawing when it scrolls out of view, so a dashboard of twelve costs nothing, and it reads its colours from the page, so it follows light and dark without a prop.