The fastest open-source charting library — 50M points at 60 FPS.
ChartGPU is a TypeScript charting library built on WebGPU for smooth, interactive rendering—especially when you have lots of data.
35,000,000 points rendered at ~72 FPS (benchmark mode).
import { ChartGPU } from 'chartgpu';
const container = document.getElementById('chart')!;
await ChartGPU.create(container, {
series: [{ type: 'line', data: [[0, 1], [1, 3], [2, 2]] }],
});Add reference lines, point markers, and text overlays to highlight important data features:
await ChartGPU.create(container, {
series: [{ type: 'line', data: [[0, 1], [1, 3], [2, 2]] }],
annotations: [
// Horizontal reference line
{
id: 'ref-y',
type: 'lineY',
y: 2.5,
layer: 'belowSeries',
style: { color: '#ffd166', lineWidth: 2, lineDash: [8, 6], opacity: 0.95 },
label: { text: 'threshold' },
},
// Point marker at peak
{
id: 'peak',
type: 'point',
x: 1,
y: 3,
layer: 'aboveSeries',
marker: { symbol: 'circle', size: 8, style: { color: '#ff4ab0' } },
label: { template: 'peak={y}', decimals: 2 },
},
],
});See Annotations Documentation and the annotations example.
- 🚀 WebGPU-accelerated rendering for high FPS with large datasets
- 📈 Multiple series types: line, area, bar, scatter, pie, candlestick
- 🌡️ Scatter density/heatmap mode (
mode: 'density') for large point clouds — seedocs/api/options.md#scatterseriesconfigandexamples/scatter-density-1m/ - 📍 Annotation overlays: reference lines (horizontal/vertical), point markers, and text labels — see
docs/api/options.md#annotationsandexamples/annotations/ - 🧭 Built-in interaction: hover highlight, tooltip, crosshair
- 🔁 Streaming updates via
appendData(...)with typed-array support (XYArraysData,InterleavedXYData,DataPoint[]) — seeexamples/cartesian-data-formats/ - 🔍 X-axis zoom (inside gestures + optional slider UI)
- 🎛️ Theme presets (
'dark' | 'light') and custom theme support - 🔗 Shared GPUDevice support for multi-chart dashboards (efficient GPU resource management) — see
docs/api/chart.md#shared-gpudevice
Financial OHLC (open-high-low-close) candlestick rendering with classic/hollow style toggle and color customization. The live streaming demo renders 5 million candlesticks at over 100 FPS with real-time updates.
GPU-binned density/heatmap mode for scatter plots (mode: 'density') to reveal structure in overplotted point clouds. See docs/api/options.md#scatterseriesconfig and the demo in examples/scatter-density-1m/.
Full-featured annotation authoring system with interactive editing capabilities. Create, edit, drag, and delete annotations with an intuitive UI. Supports all annotation types: reference lines (horizontal/vertical), point markers, text annotations (plot-space + data-space tracking), labels, and styling options.
Key features:
- Right-click empty space → Add vertical/horizontal line or text note with custom color, style & label
- Click & drag annotations → Reposition them (lines constrained to their axis)
- Right-click on annotation → Edit properties or delete
- Full styling control → Color picker, line style (solid/dashed), line width, and label customization
- Undo/Redo support → All annotations are reversible
- Scroll to zoom, Drag to pan → Standard chart interactions work seamlessly
The annotation authoring system is demonstrated in the examples/annotation-authoring/ example.
npm install chartgpuGitHub Packages:
npm install @chartgpu/chartgpuFor GitHub Packages, configure your .npmrc:
@chartgpu:registry=https://npm.pkg.github.com
React bindings are available via chartgpu-react:
npm install chartgpu-reactimport { ChartGPUChart } from 'chartgpu-react';
function MyChart() {
return (
<ChartGPUChart
options={{
series: [{ type: 'line', data: [[0, 1], [1, 3], [2, 2]] }],
}}
/>
);
}See the chartgpu-react repository for full documentation and examples.
- Chrome 113+ or Edge 113+ (WebGPU enabled by default)
- Safari 18+ (WebGPU enabled by default)
- Firefox: Windows 114+, Mac 145+, Linux nightly
See the gpuweb repository for full Implementation Status
ChartGPU is a young project and we'd love to hear how you're using it! If your team or project uses ChartGPU, open a pull request to add your name here.
- Full documentation: Getting Started
- API reference:
docs/api/README.md
- Browse examples:
examples/ - Run locally:
npm installnpm run dev(openshttp://localhost:5173/examples/)
See CONTRIBUTING.md.
MIT — see LICENSE.
ChartGPU follows a functional-first architecture. ChartGPU.create(...) owns the canvas and WebGPU lifecycle, delegating render orchestration to a modular render coordinator with 11 specialized modules.
For the full architecture diagram, see docs/ARCHITECTURE.md. For deep internal notes, see docs/api/INTERNALS.md.






