forever components

Micro Data-Viz

Scatter Regression Settle

46 teal dots fly in, jitter, then settle as a glowing regression line and confidence band sweep to fit. Pearson r reveals as the line converges.

canvasmedium complexitymoderate motionclick

Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited

Live demo — the real component, running in a sandbox. One self-contained HTML file, zero dependencies. Open it on the canvas →
Worth keeping? Votes steer what gets built next — sign in to cast one, free to read

When to use it

Dashboard hero widgets, statistics explainers, data literacy demos, or ambient looping data-art backgrounds.

When not to

Contexts requiring interactive exploration of real data — points and regression are hardcoded. Low-motion environments get a static late-phase frame only.

Working with an AI agent

Every component ships agent-ready metadata. An example instruction for this one:

Change point count to 30 (N=30), increase noise to 0.26 (gauss()*0.26), and shift accent color to coral by replacing AC='#2fd2b0' with AC='#ff6b6b'. Theme: dark tokens live in :root, the light variant in :root[data-theme="light"]; ?theme=light or a {type:'forever:theme'} postMessage switches at runtime.

Safe to edit

  • point count (N=46)
  • regression slope/intercept (a0=0.18, b0=0.62)
  • noise sigma (gauss()*0.16)
  • accent color (AC='#2fd2b0')
  • cycle length (CYC=560 frames)
  • confidence band width multiplier (widen formula)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • IIFE wrapper
  • prefers-reduced-motion guard (static late-phase frame)
  • visibilitychange pause/resume
  • DPR-aware canvas sizing
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • Data is fully synthetic and hardcoded — not wired to real data sources
  • Confidence band is a visual approximation, not a statistically rigorous interval
  • pointermove nudges internal state but has no visible effect beyond a minor timing shift

scatter-plotregressiondata-vizcanvasstatisticsanimationteal

More Micro Data-Viz components

  • Bar Grow + ReshuffleSeven rounded gradient bars ease to new random heights every 1.6s with glowing cap dots. Click triggers an immediate reshuffle.
  • Live Line SweepA glowing cyan area line chart scrolls a live sine-plus-noise time-series across a faint grid, with a white head dot marking the latest value.
  • Donut Ring ProgressOlive-to-terracotta gradient donut ring eases its fill to random targets with a leading dot and large centered percentage readout. Tap to jump to a new value.
  • Sparkline Moving DotA green sparkline traces itself across a faint ghost path, led by a haloed white dot; on completion it regenerates a new random 28-point series.
  • Radial Gauge NeedleSemicircular gauge on dark amber background with green-yellow-red arc segments; a glowing white needle sweeps smoothly via sine wave with a live 0–100…
  • Heatmap Ripple12x6 grid of rounded cells colored via a magma ramp, with a sine-wave ripple emanating from a point that orbits and follows the cursor.