npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

chartgpu

v0.4.0

Published

High-performance WebGPU charting library

Readme


Overview

ChartGPU renders charts with WebGPU (not Canvas2D or WebGL). It is aimed at:

  • Dense time series and multi-million-point series
  • Streaming updates (appendData with optional ring capacity)
  • Shared-device multi-chart dashboards
  • 2D series plus cartesian3d (pointCloud3d, surface3d)

There is no WebGL/Canvas fallback. Unsupported browsers must be gated by the host app.


Demo

ChartGPU demo

Streaming multi-chart wall (shared GPU device):

Streaming multi-chart dashboard

Streaming dashboards · Multi-chart cookbook · Live examples

| Scatter density | Candlestick / OHLC | Annotations | |:---:|:---:|:---:| | Scatter density | Candlestick | Annotations |


Install

npm install @chartgpu/chartgpu

Also published as unscoped chartgpu (same version line). React bindings: chartgpu-react (npm i chartgpu-react @chartgpu/chartgpu).

Minimal example

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]),
    },
  }],
});

// Prefer column-shaped x/y at scale; object/[x,y] tuples are fine for small demos
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 });

Requires a WebGPU-capable browser (see Browser support).


Features

  • StreamingappendData with optional maxPoints ring (FIFO). Heatmap and 3D surfaces use dedicated update APIs (updateHeatmap, updateSurface3D) rather than full option rewrites every tick.
  • Sampling — LTTB / min / max on the CPU; eligible line series can run decimation on the GPU. Nulls create gaps; optional connectNulls. performance.lod: auto | strict.
  • Multi-chart — Share one GPUDevice and pipeline cache across charts (≥3 recommended). Zoom sync via connectCharts.
  • Interaction — Zoom, pan, multi-axis Y scales, dark/light/custom themes, annotations.
  • 3DcoordinateSystem: 'cartesian3d' with pointCloud3d and surface3d.
  • Dependencies — Zero npm runtime dependencies. MIT license for commercial embedding.

Architecture notes: docs/ARCHITECTURE.md. Performance guide: chartgpu.io/docs/performance. Theming: chartgpu.io/docs/theming.


Series types

Full options: API — options.

| Category | Types / modes | Docs | |----------|----------------|------| | Cartesian | line, area, bar, scatter, pie | line · scatter | | Finance | candlestick, ohlc | candlestick | | Scientific | heatmap, band, errorBar, impulse | heatmap | | Variants | step line/area · stacked mountain · scatter mode: 'density' | charting | | 3D | pointCloud3d, surface3d | 3D API |


Multi-chart (shared device)

For three or more charts on one page, create a single adapter/device/pipeline cache and pass it into each ChartGPU.create. Charts do not destroy a shared device on dispose.

import { ChartGPU, createPipelineCache, connectCharts } from '@chartgpu/chartgpu';

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

const adapter = await navigator.gpu.requestAdapter({ powerPreference: 'high-performance' });
if (!adapter) throw new Error('No GPU adapter');

const device = await adapter.requestDevice();
const pipelineCache = createPipelineCache(device);
const ctx = { adapter, device, pipelineCache };

const a = await ChartGPU.create(document.getElementById('a')!, {
  series: [{ type: 'line', data: { x: new Float64Array([0]), y: new Float64Array([0]) } }],
}, ctx);
const b = await ChartGPU.create(document.getElementById('b')!, {
  series: [{ type: 'line', data: { x: new Float64Array([0]), y: new Float64Array([0]) } }],
}, ctx);
const c = await ChartGPU.create(document.getElementById('c')!, {
  series: [{ type: 'line', data: { x: new Float64Array([0]), y: new Float64Array([0]) } }],
}, ctx);

connectCharts([a, b, c], { syncZoom: true });
// Optional: setRenderMode('external') + renderFrame() for a single app rAF loop

Recipes: multi-chart cookbook · streaming dashboards.


Browser support

WebGPU only. No WebGL path.

| Browser | Support | |---------|---------| | Chrome / Edge | 113+ | | Safari | 18+ | | Firefox | Windows 114+; macOS 145+; Linux incomplete — see gpuweb status |

Detect navigator.gpu before creating charts. Do not leave an unsupported user on a blank canvas without UI.

If you need Canvas/SVG or dual WebGL+WebGPU backends, use a library that ships those fallbacks.


Documentation

| Resource | Description | |----------|-------------| | Docs hub | Guides and series docs | | Getting started | Install and first chart | | API reference | create, options, streaming, interaction, 3D | | Charting | Series, axes, interaction | | Streaming dashboards | Shared device, multi-chart | | Annotations | Lines, markers, labels | | Performance | Density, sampling, GPU sharing | | Theming | Dark / light / custom | | Architecture | Render path (repo) | | Internals | Contributors | | examples/ | Local Vite samples |

npm install
npm run dev
# open the examples URL printed by the dev server

Contributing

See CONTRIBUTING.md and docs/ARCHITECTURE.md.

License

MIT. Free for commercial use. No npm runtime dependencies.