v0.4.0

Guides

Performance

Practices for large series and multi-chart boards: sampling, scatter density, performance.lod, streaming FIFO windows, and one shared GPUDevice.

Data shape

  • Prefer column-shaped x / y typed arrays at scale (shared x + per-series y when possible)
  • Object arrays and [x, y] tuples are fine for small demos; they allocate more on hot streams

Sampling

For dense line series, set sampling on the series (default is LTTB-oriented). Common values:

  • 'lttb', 'min', 'max' — down-sample for display; eligible null-gap-free lines can run on the GPU
  • 'none' — keep full raw in the store; preferred for hot appendData streams when the incremental path applies
  • Nulls create gaps; optional connectNulls bridges them (affects eligibility for some GPU paths)

Details: Options & series.

Level of detail (performance.lod)

  • 'auto' (default) — denser hairline / scatter compaction and sticky LTTB remap when appropriate
  • 'strict' — standard stroke width, full scatter radius, full LTTB recompute on equal-N y changes

Scatter density

Raw scatter glyphs do not scale forever. mode: 'density' bins overplotted clouds so structure stays visible. Density uses raw (unsampled) points for binning.

Streaming appends

  • Use appendData with maxPoints for a ring/FIFO window — not full setOption every tick
  • Heatmap / 3D surface use updateHeatmap / updateSurface3D, not cartesian append
  • Set animation: false (or duration 0) on high-frequency streams
  • Optional autoScroll: true to follow the live edge

Patterns: Multi-chart dashboards · Streaming API.

Multi-chart GPU sharing

For three or more charts on one page, create one adapter, device, and pipeline cache; pass the same context into each ChartGPU.create. Charts do not destroy a shared device on dispose. Use connectCharts when zoom should stay in sync. Optional external render mode: one app rAF that calls renderFrame() on each chart.

Hosted stress demos

Related API