logoalt Hacker News

Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)

453 pointsby huntergemmertoday at 2:54 PM139 commentsview on HN

Creator here. I built ChartGPU because I kept hitting the same wall: charting libraries that claim to be "fast" but choke past 100K data points.

The core insight: Canvas2D is fundamentally CPU-bound. Even WebGL chart libraries still do most computation on the CPU. So I moved everything to the GPU via WebGPU:

- LTTB downsampling runs as a compute shader - Hit-testing for tooltips/hover is GPU-accelerated - Rendering uses instanced draws (one draw call per series)

The result: 1M points at 60fps with smooth zoom/pan.

Live demo: https://chartgpu.github.io/ChartGPU/examples/million-points/

Currently supports line, area, bar, scatter, pie, and candlestick charts. MIT licensed, available on npm: `npm install chartgpu`

Happy to answer questions about WebGPU internals or architecture decisions.


Comments

maximgeorgetoday at 3:45 PM

[dead]

dfortestoday at 5:19 PM

[dead]

ycombadmin3today at 8:13 PM

[dead]

acedTrextoday at 3:43 PM

[flagged]

show 3 replies
buckle8017today at 4:31 PM

WebGPU is a security nightmare.

The idea that GPU vendors are going to care about memory access violations over raw performance is absurd.

show 1 reply