Live data from Hacker News

Show HN: A JavaScript library for data visualization in both SVG and Canvas

github.com

21–30 of 44 posts

Re: Show HN: A JavaScript library for data visualization in both SVG and Canvas

#21

Hey there, If a focus is on performance, would you consider doing a side-by-side with other similar libs? This benchmark was posted on HN a few years back, for example: https://benchmarks.slaylines.io/ (from https://news.ycombinator.com/item?id=23083730 ) Or something like the bunnymarks for Pixi ( https://www.goodboydigital.com/pixijs/bunnymark/ ) and Konva ( https://konvajs.org/docs/sandbox/Jumping_Bunnies.html ) Y…

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.

Re: Show HN: A JavaScript library for data visualization in both SVG and Canvas

#22
post #20

As much as I appreciate this (sakes me the time of doing mind-bending D3, etc.), I would very much rather have an off-screen renderer that could generate SVGs server-side. Somehow we’ve almost completely lost the art of offscreen rendering, which is so much more useful for things like mail, documents, etc.

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...

Re: Show HN: A JavaScript library for data visualization in both SVG and Canvas

#23
post #6

Earlier quoted context omitted.

I should stake my personal usage Nobody is asking you to do that, you can assess that for yourself if you're interested in looking at the project, if not, there's not much point subjecting the author to this sort of interrogation.

Consider it rephrased in a way that doesn’t upset you, like “what do you think the advantages of your new library are that outweigh the years of development behind existing libraries?”

Consider it rephrased in a way that doesn’t upset you

Consider not projecting emotional states on people you expect to reply to you.

“what do you think the advantages of your new library are that outweigh the years of development behind existing libraries?”

Like the sibling comment says, that's an obviously loaded question. But more importantly - Show HN is for all kinds of projects - from polished commercial offerings to learning projects or scratch-an-itch projects in their early stages of development. It doesn't make sense (nor is it particularly respectful of the author or inviting to new authors) to treat the posts of personal projects like a sales call and present them a list of generic, reflexive checkmarks and requirements questions. A Show HN of that sort is an invitation to take a look at something, provide feedback, chitchat with the developer if you have an interest in the particular topic. If fully-baked things are more your speed, you can just find a Show HN that showhns that.

Re: Show HN: A JavaScript library for data visualization in both SVG and Canvas

#24
post #14

The demo needs some work on mobile phones. Doesn't even show up unless I put my phone in landscape mode.

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.

Re: Show HN: A JavaScript library for data visualization in both SVG and Canvas

#25

The readme needs some SVGs (you can embed graphics on github's readme) edit: actually the web page too https://ripl-alpha.vercel.app/ - if your project render things to the screen, I want to see it!

Thanks for the tip :) I've added some screenshots to the readme now.

Can't you make the screenshots svg themselves?

Re: Show HN: A JavaScript library for data visualization in both SVG and Canvas

#26
post #20

As much as I appreciate this (sakes me the time of doing mind-bending D3, etc.), I would very much rather have an off-screen renderer that could generate SVGs server-side. Somehow we’ve almost completely lost the art of offscreen rendering, which is so much more useful for things like mail, documents, etc.

> mind-bending D3

That's something that bugs me too. D3 is pretty amazing but is only accessible to coders.

> we’ve almost completely lost the art of offscreen rendering

markdown2.com is something I'm working on to address that. It lets you design markdown documents containing charts & diagrams, and then Save As HTML/PDF or SVG/JPG. There's also an API for generating them in bulk.

Re: Show HN: A JavaScript library for data visualization in both SVG and Canvas

#27
post #20

As much as I appreciate this (sakes me the time of doing mind-bending D3, etc.), I would very much rather have an off-screen renderer that could generate SVGs server-side. Somehow we’ve almost completely lost the art of offscreen rendering, which is so much more useful for things like mail, documents, etc.

There are plenty of options to render SVG serverside, no idea why you think “we’ve almost completely lost the art”. For instance, with Apache Echarts: https://apache.github.io/echarts-handbook/en/how-to/cross-pl... Plus you can always use browser automation like playwright, though that’s more resource heavy.

Re: Show HN: A JavaScript library for data visualization in both SVG and Canvas

#28

> DOM-like event bubbling This does sound very interesting. I started playing with https://two.js.org/ for a browser game but the event system proved a challange. The typescript focus also looks promising. Will give it a try.

What did you find challenging about it?

Re: Show HN: A JavaScript library for data visualization in both SVG and Canvas

#29
post #26
post #20

As much as I appreciate this (sakes me the time of doing mind-bending D3, etc.), I would very much rather have an off-screen renderer that could generate SVGs server-side. Somehow we’ve almost completely lost the art of offscreen rendering, which is so much more useful for things like mail, documents, etc.

> mind-bending D3 That's something that bugs me too. D3 is pretty amazing but is only accessible to coders. > we’ve almost completely lost the art of offscreen rendering markdown2.com is something I'm working on to address that. It lets you design markdown documents containing charts & diagrams, and then Save As HTML/PDF or SVG/JPG. There's also an API for generating them in bulk.

…with a headless browser, I suppose. Which is not ideal.
Post reply on HN