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/ytyped arrays at scale (sharedx+ per-seriesywhen 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 hotappendDatastreams when the incremental path applies- Nulls create gaps; optional
connectNullsbridges 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
appendDatawithmaxPointsfor a ring/FIFO window — not fullsetOptionevery tick - Heatmap / 3D surface use
updateHeatmap/updateSurface3D, not cartesian append - Set
animation: false(or duration 0) on high-frequency streams - Optional
autoScroll: trueto 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
- Streaming API —
appendData/maxPoints - Options — sampling,
performance.lod - Chart API — shared device, external render mode