Is there a best practice how to stream and plot large signal data (e.g. > 1M data points of multiple sine waves) from a Python backend (e.g. numpy + FastAPI) to frontend? My current solution is: fetch ADC data, convert the bytes to base64 and embed it to JSON that will be send to the frontend. Frontend reverses this process and plot it to eCharts.
Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
201–210 of 226 posts
Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#202What's the best way to get all those points from a backend into the frontend webgpu compute shader? There doesn't seem to be a communication mechanism that has minimal memcopy or no serialization/deserialization, the security boundary makes this difficult. I have a backend array of 10M i16 points, I want to get this into the frontend (with scale & offset data provided via side channel to the compute shader). As it st…
Not sure, but I solved a similar problem many years ago, and ended up concluding it was silly to send all the data to the client when the client didn't have the visual resolution to show it anyway. So I sampled it adaptively client-side by precomputing and storing multiple zoom-levels. That way the client-side chart app would get the points and you could zoom in, but you'd only ever retrieve about 1000-2000 points at…
Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#203Very cool. Shame there's not a webgl fallback though. It will be a couple of years until webgpu adoption is good enough. https://caniuse.com/webgpu
Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#204Safari on latest Sequoia doesn't support this. Given that many people will not upgrade to the latest version, it is a shame Safari is behind these things.
Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#205Earlier quoted context omitted.
Thanks! The name was honestly just "what does this do" + "how does it do it" haha. Interesting you mention three.js - there's definitely overlap in the WebGPU graphics space. My focus is specifically on 2D data visualization (time series, financial charts, dashboards), but I could see the rendering patterns being useful elsewhere. On sustainability - still figuring that out. For now it's a passion project, but I've t…
Have you thought about leaning into some of the fintech space? They'd happily pay for the sorts of features they need to stream financial data (which is usually bazillions of data points) and graph it efficiently. Off the top of my head, look into Order Book Heatmaps, 3D Volatility Surfaces, Footprint Charts/Volatility deltas. Integrating drawing tools like Fibonacci Retracements, Gann Fans etc. It would make it very…
This comment was buried yesterday. I'm sorry for the late response!
I was thinking about a pro tier for this kind of specialized stuff. Core stays MIT forever, but fintech tooling could be paid.
Of the chart types you listed, is there a preference for what gets done first?
Order Book Heatmaps first?
Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#206Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#207The project (even if it's made with the help of LLMs) is nice, but the author writing all of his HN comments with LLMs is not.
Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#208Earlier quoted context omitted.
Really appreciate you taking the time to look, Leon - uPlot has been a huge inspiration for proving that browser charts don't have to be slow. Both points are fair: 1. LTTB peak elimination - you're right, and that PR is a great reference. For the 1M demo specifically, sampling is on by default to show the "it doesn't choke" story. Users can set sampling: 'none' for apples-to-apples comparison. I should probably add…
Blind sampling like this makes it useless for real-world statistics of the kind your users care about. And column-oriented data is a must . Look at Rlang's data frames, pandas, polars, numpy, sql, and even Fortran's matrix layout. Also need specialized expicitly targetable support for Float32Array and Float64Array. Both API and ABI are necessary if you want to displace incumbents. There is huge demand for a good web…
Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#209Does this support stacked area charts? Like https://recharts.github.io/en-US/examples/StackedAreaChart/ ? That's what I'm using now but I gave it too much data and it takes like a minute to render so I'm quite interested in this.
Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#210What's the best way to get all those points from a backend into the frontend webgpu compute shader? There doesn't seem to be a communication mechanism that has minimal memcopy or no serialization/deserialization, the security boundary makes this difficult. I have a backend array of 10M i16 points, I want to get this into the frontend (with scale & offset data provided via side channel to the compute shader). As it st…
But minimizing copying or avoiding format conversions doesn't necessarily get you best performance of course.