Live data from Hacker News

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

github.com

191–200 of 226 posts

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

#191

uPlot maintainer here. this looks interesting, i'll do a deeper dive soon :) some notes from a very brief look at the 1M demo: - sampling has a risk of eliminating important peaks, uPlot does not do it, so for apples-to-apples perf comparison you have to turn that off. see https://github.com/leeoniya/uPlot/pull/1025 for more details on the drawbacks of LTTB - when doing nothing / idle, there is significant cpu being…

Is there any techniques using wavelet decomposition to decimate the high frequency component while retaining peaks? I feel like that's a more principled approach than sampling but I haven't seen any literature on it describing the specific techniques (unless the idea is fundamentally unsound which is not obvious to me).

This really depends on your problem domain.

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

#192

Earlier quoted context omitted.

Is there any techniques using wavelet decomposition to decimate the high frequency component while retaining peaks? I feel like that's a more principled approach than sampling but I haven't seen any literature on it describing the specific techniques (unless the idea is fundamentally unsound which is not obvious to me).

Interesting idea - I haven't explored wavelet-based approaches but the intuition makes sense: decompose into frequency bands, keep the low-frequency trend, and selectively preserve high-frequency peaks that exceed some threshold. My concern would be computational cost for real-time/streaming use cases. LTTB is O(n) and pretty cache-friendly. Wavelet transforms are more expensive, though maybe a GPU compute shader cou…

Doesn't FFT depend at least on a "representative" sample of the entire dataset?

Sounds like what makes sql joins NP-hard.

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

#193

Earlier quoted context omitted.

Interesting idea - I haven't explored wavelet-based approaches but the intuition makes sense: decompose into frequency bands, keep the low-frequency trend, and selectively preserve high-frequency peaks that exceed some threshold. My concern would be computational cost for real-time/streaming use cases. LTTB is O(n) and pretty cache-friendly. Wavelet transforms are more expensive, though maybe a GPU compute shader cou…

I don't. I just remember watching a presentation on it and it always struck me that wavelets are an incredibly powerful and underutilized technique for data reduction while preserving quality in a quantifiable and mathematically justifiable way. I don't have any papers in mind, but I do think that the critique around visual shape vs signal reconstruction may not be accurate given that wavelets are starting to see a l…

This might be because JPEG already does FFT/DCT.

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

#194

uPlot maintainer here. this looks interesting, i'll do a deeper dive soon :) some notes from a very brief look at the 1M demo: - sampling has a risk of eliminating important peaks, uPlot does not do it, so for apples-to-apples perf comparison you have to turn that off. see https://github.com/leeoniya/uPlot/pull/1025 for more details on the drawbacks of LTTB - when doing nothing / idle, there is significant cpu being…

> creating multiple charts on the same page with GL (e.g. dashboard) has historically been limited by the fact that Chrome is capped at 16 active GL contexts that can be acquired simultaneously. Plotly finally worked around this by using https://github.com/greggman/virtual-webgl Sometimes I like to ponder on the immense amount of engineering effort expended on working around browser limitations.

Think of it as finally targeting a smartphone. People like beautiful pictures. And your phone is already in your hand.

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

#195

uPlot maintainer here. this looks interesting, i'll do a deeper dive soon :) some notes from a very brief look at the 1M demo: - sampling has a risk of eliminating important peaks, uPlot does not do it, so for apples-to-apples perf comparison you have to turn that off. see https://github.com/leeoniya/uPlot/pull/1025 for more details on the drawbacks of LTTB - when doing nothing / idle, there is significant cpu being…

One small thing I noticed: when you zoom in or out (or change the time span), the y-axis stays the same instead of adapting to the visible data.

Both are useful. With the y-axis staying the same there is a stable point of reference. Then you can see how sub-samples behave relative to your whole sample.

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

#196
post #86

If you have tons of datapoints, one cool trick is to do intensity modulation of the graph instead of simple "binary" display. Basically for each pixel you'd count how many datapoints it covers and map that value to color/brightness of that pixel. That way you can visually make out much more detail about the data. In electronics world this is what "digital phosphor" etc does in oscilloscopes, which started out as just…

Good idea.

Add Lab-comor space for this though, like the color theme solarized-light.

Also add options to side-step red-green blindness and blue-yellow blindndess.

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

#197
post #127

Earlier quoted context omitted.

Drawing lots of single pixels with alpha blending is probably one of the least efficient ways to use the rasterizer though. A good compute shader implementation would be substantially faster.

At 1M points it hardly makes a difference. Besides, 1 point -> 1 pixel mapping is good enough for a demo, but in practice it will produce nasty aliasing artifacts because real datasets aren't aligned with pixel coordinates. So you have to draw each point as a 2x2 square at least with precise shading, and we are back to the rasterizer pipeline. Edit: what actually needs to be computed is the integral of the points dat…

No difference for human visuals or no difference for discrete data or no difference for "continuous" f32 data?

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

#198
Look at Stephen Few's website and books.

http://perceptualedge.com/examples.php

There is also ggplot, ggplot2 and the Grammar of Graphics by Leland Wilkinson. Sadly, Algebra is so incompatible with Geometry that I found the book beautiful but useless for my problem domains after buying and reading and pondering it.

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

#199

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 API and ABI for this are tricky to get right.

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

#200

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…

> 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 The computer on my desk only costs me the electric power to run it, and there's 0 network latency between it and the monitor on which I'm viewing charts. If I am visualizing some data and I want to rapidly iterate on the visualization or interact with it, there's no more ideal place for t…

And with a JS-friendly tool you can also test your plots on a tablet and a phone in your local wifi.
Post reply on HN