forever components

Charts & Flow

Treemap

7 rounded cells partition the canvas via slice-dice treemap; cells lerp to new sizes every 2.6 s as synthetic values drift, with a subtle alpha pulse.

canvasmedium complexitymoderate motion

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 tiles, data-viz demos, or ambient backgrounds needing a structured chart feel without real data wiring.

When not to

Contexts requiring real data input or interaction — values are synthetic and auto-cycling only; no click or hover API exposed.

Working with an AI agent

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

Change N to 5 categories, set period to 4000 for slower transitions, and swap --ch03-c0 to #ff6b6b for a warm red accent. 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

  • category count (N=7)
  • update period (period=2600ms)
  • palette CSS variables (--ch03-c0 through --ch03-c5)
  • lerp speed (e = dt/170)
  • padding ratio (0.07 factor in PAD)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

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

Known limitations

  • Labels (A-G) are alphabetic indices only — no real data binding
  • Slice-dice algorithm can produce tall slivers for extreme value imbalances
  • Background color hardcoded via --ch03-bg CSS variable; must override to change

treemapdata-vizcanvaschartsgenerativeambientlayout

More Charts & Flow components

  • Sankey FlowThree-stage Sankey diagram on dark canvas: bezier ribbons grow stage-by-stage from origins to hubs to outcomes, pulsing softly in opacity to show flow volume.
  • Chord DiagramEight ring nodes with curved ribbons that swell and shrink as weights rebalance every ~3s. Additive blending creates glowing color overlaps.
  • CandlesticksGreen and red OHLC candles stream in from the right with smooth slide animation; newest candle grows from pivot. Dashed last-price marker traces horizontally.
  • StreamgraphSix translucent stacked bands breathe around a central baseline via layered sines; a sweeping readout line tracks across with colored tick dots per band.
  • Sparkline GridNine teal sparklines in a 3x3 grid scroll leftward every 140ms; orange/blue diamonds mark running max/min and a halo dot tracks the latest value.
  • Bubble Pack64 mint/teal/amber/coral circles settle under gravity with collision physics; size encodes value. Large bubbles pull toward center with a breathing pulse.