Live data from Hacker News

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

github.com

31–40 of 226 posts

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

#31
Fantasic Hunter, congrats!

I've been looking for a followup to uPlot - Lee who made uPlot is a genius and that tool is so powerful, however I need OffscreenCanvas running charts 100% in worker threads. Can ChartGPU support this?

I started Opus 4.5 rewrite of uPlot to decouple it from DOM reliance, but your project is another level of genius.

I hope there is consideration for running your library 100% in a worker thread ( the data munging pre-chart is very heavy in our case )

Again, congrats!

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

#33

No Firefox support? It has had WebGPU support since version 141. Even when I turn on dom.webgpu.enabled, I still get "WebGPU is disabled by blocklist" even though your domain is not in the blocklist, and even if I turn on gfx.webgpu.ignore-blocklist.

Works for me with 146.0.1 (Linux) and having dom.webgpu.enabled set to true.

Works for me too 145/Windows - default settings.

Very cool project. Thanks!!!

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

#34
I've always been a bit skeptical of JS charting libs that want to bring the entire data to the client and do the rendering there, vs at least having the option to render image tiles on the server and then stream back tooltips and other interactive elements interactively.

However, this is pretty great; there really aren't that many use cases that require more than a million points. You might finally unseat dygraphs as the gold standard in this space.

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

#35

Both a .cursor AND a .claude folder, what a yikes. Slop post galore

.c? what a yikes. I took a quick look at the code and this application doesn't even have any machine code in it, it's just words like "while", "for", "if", "else" and other English words - someone back in 1970s, I'm sure.

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

#36

Very cool, I like the variety of demos! On the candle sticks streaming demo ( https://chartgpu.github.io/ChartGPU/examples/candlestick-str... ), the 1s/5m/15m etc buttons don't seem to do anything

Good catch! Thanks for actually clicking around and finding this - added to my issue tracker.

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

#38

I've always been a bit skeptical of JS charting libs that want to bring the entire data to the client and do the rendering there, vs at least having the option to render image tiles on the server and then stream back tooltips and other interactive elements interactively. However, this is pretty great; there really aren't that many use cases that require more than a million points. You might finally unseat dygraphs as…

> render image tiles on the server and then stream back tooltips and other interactive elements interactively.

I guess the real draw here is smooth scrolling and zooming, which is hard to do with server-rendered tiles. There's also the case of fully local use, where server rendering doesn't make much sense.

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

#39
I just rewrote all the graphs on phrasing [1] to webgl. Mostly because I wanted custom graphs that didn’t look like graphs, but also because I wanted to be able to animate several tens of thousands of metrics at a time.

After the initial setup and learning curve, it was actually very easy. All in all, way less complicated than all the performance hacks I had to do to get 0.01% of the data to render half as smooth using d3.

Although this looks next level. I make sure all the computation happens in a single o(n) loop but the main loop still takes place on the cpu. Very well done

To anyone on the fence, GPU charting seemed crazy to me beforehand (classic overengineering) but it ends up being much simpler (and much much much smoother) than traditional charts!

[1] https://phrasing.app

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

#40

Fantasic Hunter, congrats! I've been looking for a followup to uPlot - Lee who made uPlot is a genius and that tool is so powerful, however I need OffscreenCanvas running charts 100% in worker threads. Can ChartGPU support this? I started Opus 4.5 rewrite of uPlot to decouple it from DOM reliance, but your project is another level of genius. I hope there is consideration for running your library 100% in a worker thre…

Thanks! Leon's uPlot is fantastic - definitely an inspiration.

Worker thread support via OffscreenCanvas is a great idea and WebGPU does support it. I haven't tested ChartGPU in a worker context yet, but the architecture should be compatible - we don't rely on DOM for rendering, only for the HTML overlay elements (tooltips, axis labels, legend).

The main work would be: 1. Passing the OffscreenCanvas to the worker 2. Moving the tooltip/label rendering to message-passing or a separate DOM layer

For your use case with heavy data munging, you could also run just the data processing in a worker and pass the processed arrays to ChartGPU on the main thread - that might be a quicker win.

Would you open an issue on GitHub? I'd love to understand your specific workload better. This feels like a v0.2 feature worth prioritizing.

Post reply on HN