v0.4.0

Start

Getting started

Install @chartgpu/chartgpu, size a container, and call ChartGPU.create with at least one series. The playground on this page runs the same minimal line chart.

Install

The package name on npm is @chartgpu/chartgpu. Install with your package manager:

Shell
npm install @chartgpu/chartgpu
# or: pnpm add @chartgpu/chartgpu
# or: bun add @chartgpu/chartgpu

Minimal example

Create a sized container element, then pass options with at least one series. Line data can be [x, y] tuples.

TypeScript
import { ChartGPU } from '@chartgpu/chartgpu';

const container = document.getElementById('chart')!;
const chart = await ChartGPU.create(container, {
  theme: 'dark',
  series: [{
    type: 'line',
    data: [[0, 1], [1, 3], [2, 2], [3, 5], [4, 4]],
  }],
});

// later
chart.dispose();

Browser support

Live GPU demos need WebGPU: Chrome or Edge 113+, Safari 18+. Firefox support depends on platform and flags. Feature-detect with 'gpu' in navigator and offer a non-GPU fallback UI when needed.

Next steps

Try it