Feature Library

One mark per record

1.37 GPU · 0.13 CPU ms
A still of the One mark per record demo
Still
The live demo starts when it’s in view.Drag across any chart to brush it · click rows and cells · Tab to a chart, then the arrows (Shift to resize, Escape to clear)

A cross-filtered dashboard where every record is one mark on one WebGPU canvas, up to a million of them.

What it costs a frame

1.37 ms
0.13 ms
GPU
1.37 ms
CPU, median
0.13 ms
CPU, 95th pct
0.18 ms
Draw calls
0
Weight
Moderate

Measured 11 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Measured at 250,000 marks in the overview, a time brush sweeping across the day (a cross-filter pass over every order, the eased histograms, and six views of marks redrawn each frame), the large chart changing every 4 s (a flight). Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
unknown GPU · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring tool1.370.130.18
apple · Apple A19 Proin a browser tab · 16 November 20269.800.300.46
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 202615.90.280.60

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
WebGPUNeeds WebGPU: current Chrome and Edge, Safari 26+, Firefox 141+ on Windows.
Your browser
Checking…Looking for WebGPU
Depends on
NothingNo other packages

What it’s for

  1. Brushing linked charts over a big table
  2. Dashboards that keep every record visible
  3. A large chart any other can fly into
  4. Live feeds that fly into every chart
  5. Headline figures that add up exactly
  6. Proving GPU numbers with a CPU audit

Pitfalls, in brief

  1. Fields are whole numbers 0..65,535 packed two to a word; bin them on the CPU before you pack (minutes, a log amount bin, a category index).
  2. Exact sums: a measure value must stay under 2^24 (16,777,215: in cents, $167,772.15) and a summed chart holds up to 2^20 records, so the low and high parts each fit a 32-bit atomic.
  3. The totals that pass every brush come from the cross-filter counts with the chart’s own brush applied on the CPU (passingCounts, passingSums, totals).
  4. A chart nobody draws still counts: give it no view (the demo’s fine amount chart, read for an exact median).
  5. Atomics on a chart with few bins (a status row of four) contend: it is the cost that grows fastest with the record count.
10 more in brief
  1. Readbacks are asynchronous and the newest wins.
  2. Views are CSS pixels from the canvas’s top left, and the canvas must cover exactly the area your DOM chrome is laid out in: titles, axes and brushes are yours, placed from the same rects. resize() with the canvas’s CSS size and the pixel ratio whenever it changes.
  3. Field 0 orders the wave of a flight (records leave in its order): put time first.
  4. The view index is the identity a flight follows: to make another chart the large one, swap the charts of two views and fly; do not give view 0 a new chart and view 3 the old one’s rect.
  5. The capacity grows when more records arrive (buffers reallocated and copied, pipelines kept), up to 2^21 records: the picker packs an index in 21 bits.
  6. Derive figures from a histogram with the brushes it carries (h.brushes), not the live ones: a readback is a frame or two old, and a status share from an old histogram over a new brush can pass 100%.
  7. With autoFrame off (inside another loop), call frame(dt) every frame: it returns at once when nothing changed and draws nothing.
  8. On an integrated GPU the record count is the dial: every record is a mark in every view (a quad of vertices that each place it) and a thread with an atomic per chart. tier: ‘low’ only trims the drawing (quads cut to the disc, the pixel ratio capped at 1); the demo also starts at 100,000 records there.
  9. Timestamp queries need the timestamp-query feature; without it gpuMs() is null.
  10. The first compile on a cold shader cache takes seconds (2 to 6 measured; createCrossfilter waits for all eight pipelines).
15 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From HaTac. Fully custom code.

Square, Crossfilter (Mike Bostock and others, 2012): The idea: each chart’s histogram counts the records that pass every other chart’s brush, so a brushed chart still shows what lies outside its brush. Written here from the idea, on the GPU; no code from the library.

Steven Drucker & Roland Fernandez, A unifying framework for animated and interactive unit visualizations (SandDance, Microsoft Research, 2015): One mark per record, moving between layouts.

Deokgun Park, Steven Drucker, Roland Fernandez & Niklas Elmqvist, Atom: a grammar for unit visualizations (2018): Unit charts: a bar made of its records.

Jeffrey Heer & George Robertson, Animated transitions in statistical data graphics (2007): Staged, staggered transitions between charts that keep the viewer’s place.

Chris Wellons, hash prospector (lowbias32): The integer hash that scatters marks inside their bins (public domain).

Tommy Ettinger, Mulberry32: The demo’s seeded generator and the tests’ (public domain).

Ken Perlin, Improving noise (SIGGRAPH 2002): The smootherstep the flights ease with.

Paul Heckbert, Nice numbers for graph labels (Graphics Gems, 1990): Axis tops at 1, 1.2, 1.5, 2, 2.5… times a power of ten.

WAI-ARIA Authoring Practices Guide (W3C): Charts as focusable groups with a role description and their keys in their names; toggle buttons with aria-pressed; a polite live region for what a brush changed.

crossfilterbrushinglinked viewsunit visualizationhistogramcomputeatomicswebgpuraw webgpumorphanimated transitionsscatterheat matrixdashboardmillion pointspickingauditkeyboardreduced motionno dependencies

Near it in the frame