HNHacker News
TopNewBestAskShowJobs

andrewcourtice

72 karma · joined September 12, 2021

submissionscomments
andrewcourtice··on Show HN: A JavaScript library for data visualization in both SVG and Canvas
This is a great question.

At this point in the project my recommendation is to NOT pick Ripl over any other more mature library of similar feature-set, especially D3, Two.JS, Konva etc. These libraries, in particular D3, are written by very clever people and have been battle tested for all sorts of use-cases. Although the end goal is for Ripl to have feature/stability parity with a lot of these other libraries, at this point I can only recommend it for hobby projects or curiosity.

andrewcourtice··on Show HN: A JavaScript library for data visualization in both SVG and Canvas
I've updated the readme to use vector screenshots as opposed to raster.
andrewcourtice··on Show HN: A JavaScript library for data visualization in both SVG and Canvas
I'm in the process of moving the sidebar in the docs examples to the top so it can render properly in portrait on mobile. Should be fixed in the near future.
andrewcourtice··on Show HN: A JavaScript library for data visualization in both SVG and Canvas
Ideally in the future Ripl could support features like server-rendered SVGs and Offscreen Canvas. I already have a plan on how to go about tackling these two, I just sadly don't have the time...
andrewcourtice··on Show HN: A JavaScript library for data visualization in both SVG and Canvas
Hey there :)

Sure, once the project is a bit more mature I'd be happy to do performance comparisons.

Ripl does share quite a few similarities with other rendering libraries like Konva and Two.JS. I suppose the main difference between Ripl and the aforementioned libraries is that Ripl is more focused towards data visualization as opposed to generalised shape rendering. Hence why there are features like scales and data joins.

That being said I wouldn't expect anyone to pick Ripl over other more mature libraries. In fact I would strongly caution against it. To be honest I wrote it because I moved from being in a engineering-focused role to a people management role at work and I wanted to keep my skillset sharp :) The primary reason I posted it publicly is to gauge whether others would find it useful so that I can determine how much time/effort I should dedicate towards it.

As for a use-case for rendering to both SVG and Canvas - here's one that I have had to overcome in my current work role: suppose you have a product that can view reports both in the browser and also render on the server (in PDF or similar). In the browser, you would ideally want canvas as it produces less DOM elements and remains performant for lots of elements. On the server you may want SVGs to produce higher fidelity images to embed for print.

Another use-case would be to interchangeably render charts to different contexts based on the size of the dataset as canvas is more suited to larger datasets but is lower fidelity.

andrewcourtice··on Show HN: A JavaScript library for data visualization in both SVG and Canvas
Thanks for the tip :) I've added some screenshots to the readme now.