# ChartGPU: a WebGPU charting library with no WebGL fallback

> ChartGPU draws charts with WebGPU instead of Canvas2D or WebGL, targeting dense time series, streaming updates and shared-device dashboards. The trade-off is a hard browser requirement and no fallback path.

**ChartGPU/ChartGPU** — Beautiful, open source, WebGPU-based charting library

- Repository: https://github.com/ChartGPU/ChartGPU
- Website: https://chartgpu.io
- Stars: 3,244 · Forks: 105
- Language: TypeScript
- License: MIT
- Published: 2026-09-24 · Updated: 2026-09-24 · Language: en
- Canonical page: https://hysenlabs.com/projects/chartgpu-chartgpu

## What ChartGPU is for, and who should not use it

ChartGPU is a TypeScript charting library that renders through WebGPU rather than Canvas2D or WebGL. The README states the intended workloads plainly: dense time series and multi-million-point series, streaming updates through appendData with an optional ring capacity, shared-device multi-chart dashboards, and 2D series alongside cartesian3d with pointCloud3d and surface3d. The package is MIT licensed, published as @chartgpu/chartgpu, and reports zero npm runtime dependencies.

The audience is narrow by design. If you are building a financial terminal, a monitoring wall, or a scientific viewer where the point count is the problem, the GPU path is the reason to look. If you are building a marketing page with four bars, this is the wrong instrument: you inherit a browser requirement for no benefit.

The README is explicit that there is no WebGL or Canvas fallback, and that unsupported browsers must be gated by the host application. That sentence is the whole adoption decision in miniature. ChartGPU will not degrade for you.

## How the WebGPU rendering path is wired

A chart is created asynchronously. ChartGPU.create takes a DOM element and an options object, and returns a chart handle; the options carry a series array, and each series carries a type plus a data object with x and y columns. The README recommends column-shaped Float64Array data at scale, noting that object or [x, y] tuple forms are fine for small demos. That is a real interface constraint: the fast path wants typed columns, not arrays of pairs.

Updates go through appendData, which takes a series index, new x and y columns, and an optional maxPoints value that turns the series into a FIFO ring. Heatmap and 3D surfaces do not use that path; the README says they have dedicated update APIs, updateHeatmap and updateSurface3D, rather than rewriting the full options object every tick.

For dashboards, the shared-device pattern is the architectural centre. You request an adapter, request a device, build a pipeline cache with createPipelineCache, and pass that context into each ChartGPU.create call. Charts sharing a device do not destroy it on dispose. connectCharts links several charts with syncZoom. The README recommends the shared device for three or more charts, which implies that below that threshold the per-chart device is acceptable overhead.

Sampling happens on two levels. LTTB, min and max run on the CPU, and eligible line series can decimate on the GPU. Nulls produce gaps unless connectNulls is set, and performance.lod accepts auto or strict.

## Installing ChartGPU and drawing a first streamed line

The README gives a single install command for the scoped package:

```bash
npm install @chartgpu/chartgpu
```

It also notes the library is published under the unscoped name chartgpu on the same version line, and that React bindings live in a separate repository, chartgpu-react, installed as npm i chartgpu-react @chartgpu/chartgpu.

The minimal example creates a chart on an element and then appends to it. The first block below is the creation call as the README shows it; the second is the append, with the ring capacity set so the series keeps a bounded window.

```ts
import { ChartGPU } from '@chartgpu/chartgpu';

const el = document.getElementById('chart')!;
const chart = await ChartGPU.create(el, {
  series: [{
    type: 'line',
    data: {
      x: new Float64Array([0, 1, 2]),
      y: new Float64Array([1, 3, 2]),
    },
  }],
});
```

```ts
const x = new Float64Array([3, 4, 5]);
const y = new Float64Array([2.5, 2.1, 2.8]);
chart.appendData(0, { x, y }, { maxPoints: 50_000 });
```

The first argument to appendData is the series index, so 0 addresses the line series created above. With maxPoints set, older points fall off as new ones arrive. What you should see is a three-point line that grows as appends land.

Before any of this, check for WebGPU. The README's multi-chart example opens with a guard, and the browser support section repeats the instruction to detect navigator.gpu before creating charts and not to leave an unsupported user on a blank canvas.

```ts
if (!navigator.gpu) {
  throw new Error('WebGPU not available');
}
```

For a local look at the library, the repository ships an examples directory with folders such as basic-line, live-streaming, candlestick-streaming, chart-sync and 3d-showcase, and package.json defines a dev:vite script that runs vite against examples.

## The browser matrix is the real constraint

The README's support table is short and unforgiving. Chrome and Edge 113+, Safari 18+, and Firefox with Windows 114+, macOS 145+, and Linux listed as incomplete, pointing readers to the gpuweb implementation status wiki. There is no WebGL path, so a browser outside that table gets nothing unless the host application supplies its own fallback renderer.

This is the case where ChartGPU is the wrong tool. A public-facing analytics page cannot assume Chrome 113 or Safari 18, and the README does not describe any shim, polyfill or progressive downgrade. The library hands that problem back to you. If your product needs one chart component that works everywhere, a Canvas or SVG renderer is the safer default and you should treat ChartGPU as an enhancement for the subset of users who pass the navigator.gpu check.

The truncated README ends mid-sentence at a line beginning "If you need Canvas/SVG or dual WebGL+", which suggests the full document continues into guidance for that case. The visible portion does not contain it, so the fallback story is not something this review can describe.

## How ChartGPU differs from uPlot

uPlot appears in the related searches for this project, and the comparison is worth making concrete. uPlot renders to Canvas 2D. It draws a single chart per instance with a small API surface, and it runs in browsers that have no WebGPU at all. The rendering budget is CPU and canvas rasterisation, which is why very large point counts require downsampling before they reach the plot.

ChartGPU pushes that work onto the GPU. Points live in typed arrays, decimation can run on the GPU for eligible line series, and several charts can share one GPUDevice and pipeline cache. The cost is the browser matrix above, plus an asynchronous creation step, plus a device and adapter you may need to manage yourself when you have several charts.

So the difference is not quality, it is where the ceiling sits. If your data fits comfortably in a Canvas renderer and your audience is broad, uPlot's approach removes an entire class of deployment risk. If your data does not fit, and your audience is controlled, ChartGPU is built for exactly that gap. The README's own framing, multi-million-point series and streaming dashboards, tells you which side of the line the project is aiming at.

## Maintenance, versioning and licence

The repository is not archived. The last push was on 2026-08-24, and the most recent release listed is v0.4.0 on 2026-08-03, preceded by v0.3.10 on 2026-08-01 and v0.3.9 on 2026-07-30. That is a 0.x version line with frequent patch releases, so expect the API to move and read the CHANGELOG.md at the repository root before upgrading. The release notes for v0.3.9 mention a smooth line update animation, nicer axes and a faster FIFO cold seed, which is the kind of change that can alter visual output between patch versions.

The licence is MIT, stated in both the README and package.json. MIT permits commercial embedding and modification with the licence and copyright notice retained; nothing in the repository files suggests an additional commercial tier or a separate licence for the 3D series. That is a summary of what the files say, not legal advice, and if you are embedding the library in a distributed product you should read the LICENSE file at the repository root yourself.

Upgrade cost is mostly the WebGPU surface itself. If a browser vendor changes its WebGPU implementation, or drops support for a shader feature your charts depend on, the library cannot route around it. The repository contains a benchmarks directory and a baselines directory, plus a tests workflow referenced by the README badge, but the README does not describe what those baselines measure or how they are published.

## Conclusion

Adopt ChartGPU if you control the browser target, need multi-million-point series or streaming appends, and can gate unsupported users behind a navigator.gpu check. Do not adopt it if you need Canvas or SVG output, or if a meaningful share of your audience is on Firefox for Linux, which the README lists as incomplete. Before committing, open the line and candlestick examples under examples/ and confirm they render on your actual deployment browsers, then check the 3D and heatmap update APIs if those series types are part of your plan.

## FAQ

### Does ChartGPU work without WebGPU?

No. The README states there is no WebGL or Canvas fallback, and that unsupported browsers must be gated by the host application. It instructs you to detect navigator.gpu before creating charts.

### How do I install ChartGPU?

The README gives npm install @chartgpu/chartgpu. The library is also published under the unscoped name chartgpu on the same version line, and React bindings ship separately as chartgpu-react.

### What series types does ChartGPU support?

The README lists line, area, bar, scatter and pie; candlestick and ohlc; heatmap, band, errorBar and impulse; step and stacked variants; and the 3D types pointCloud3d and surface3d under coordinateSystem cartesian3d.

### What licence is ChartGPU released under?

MIT, according to both the README and package.json. The README describes the licence as covering commercial embedding.

## Sources

- [ChartGPU/ChartGPU on GitHub](https://github.com/ChartGPU/ChartGPU)
- [License: MIT](https://github.com/ChartGPU/ChartGPU/blob/main/LICENSE)
- [Project website](https://chartgpu.io)
- [README](https://github.com/ChartGPU/ChartGPU/blob/main/README.md)
- [Releases](https://github.com/ChartGPU/ChartGPU/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/chartgpu-chartgpu
