By no mean it is as nice looking as your demo, but it is interesting to ME... C++, compiled to WASM, using WebGL. Works on Firefox too. M4 decimation.
Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
211–220 of 226 posts
Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#212Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#213All charts in the demo failed for me. Error message: "WebGPU Error: Failed to request WebGPU adapter. No compatible adapter found. This may occur if no GPU is available or WebGPU is disabled.".
Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#214Earlier quoted context omitted.
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…
Absolute gold comment here :) 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?
Competitors typically have to snapshot/aggregate because their graphing libraries are heavily CPU bound. Being able visualise level 2/3 data without downsampling is a big win. Also being able to smoothly roll back through the last 12hrs of tick-level history would be really neat too.
I'd say the bare minimum feature set outside of that is going to be:
- Non linear X axis for gaps/sessions
- Crosshairs that snap to OHLC data
- Logarithmic scales, Candlesticks, Heikin-Ashi, and Volume profiles
- Getting the 'feel' nice so that you can quickly scale and drag (people are real sticklers for the feel of these tools)
- Solid callbacks for events for exchange integration, people hate leaving their charts to place an order eg (onOrderModify etc)
- Provide a nice websocket data ingestion pipeline
- Provide an api so devs can integrate their own indicators, some sort of 'layers' API or something.
Sorry if I can't be of more help as I'm just a hobbyist in this area!
Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#215What'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…
Look up trasnferable objects, it's not new. The fetch api can get you ArrayBuffers that you can shuffle around zero copy, besides to webgl buffers, also to web workers. But minimizing copying or avoiding format conversions doesn't necessarily get you best performance of course.
Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#216Earlier quoted context omitted.
Emm.. no, you just do one render pass to a temp framebuffer with 1 red channel, then another fragment shader maps it to an RGB palette.
Wait, does additional blending let you draw to temp framebuffers with high precision and without clamping? Even so you'd still need to know the maximum value of the temp framebuffer though.
Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#217Earlier quoted context omitted.
Absolute gold comment here :) 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?
No problem :) I asked a friend who's a bit closer to the space and he agrees, definitely Order Book Heatmaps. The speed you're getting would make this a killer feature. Competitors typically have to snapshot/aggregate because their graphing libraries are heavily CPU bound. Being able visualise level 2/3 data without downsampling is a big win. Also being able to smoothly roll back through the last 12hrs of tick-level…
Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#218Earlier quoted context omitted.
Look up trasnferable objects, it's not new. The fetch api can get you ArrayBuffers that you can shuffle around zero copy, besides to webgl buffers, also to web workers. But minimizing copying or avoiding format conversions doesn't necessarily get you best performance of course.
I had a look, that certainly looks like part of the solution, now I need to get that array buffer from my backend into the browser runtime transferable object.
Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#219Earlier quoted context omitted.
I had a look, that certainly looks like part of the solution, now I need to get that array buffer from my backend into the browser runtime transferable object.
That's the fetch api part. https://developer.mozilla.org/en-US/docs/Web/API/Response/ar...
Re: Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)
#220Earlier quoted context omitted.
Wait, does additional blending let you draw to temp framebuffers with high precision and without clamping? Even so you'd still need to know the maximum value of the temp framebuffer though.
That's what EXT_float_blend does. It's true, though, that you can't find the global min/max in webgl2. This could be done, theoretically, with mipmaps if only those mipmaps supported the max function.
Repeatedly shrinking by a factor of two means log2(max(width, height)) passes, each pass is a quarter of the pixels of the previous pass so that's a total of 4/3 times the pixels of the original image. Should be low enough overhead, right?