4 ms·
Does anyone have a similar solution for drawing graphs / charts in a Node environment without a browser dependency? Last time I explored this I couldn't find an
by vthommeret 3y ago
Does anyone have a similar solution for drawing graphs / charts in a Node environment without a browser dependency? Last time I explored this I couldn't find any good solutions.
- tills13 3y agoYou could use https://github.com/vercel/satori https://github.com/vercel/satori which supports Node 16+.
- vthommeret 3y agoThanks. I've tried using Satori but I'm curious if you've used it to draw graphs specifically. E.g. Satori expects JSX / doesn't support HTML strings from d3-node with dangerouslySetInnerHTML.
- AaronFriel 3y agoUnfortunately not for nested inline nodes, like spans of text with formatting. For a lot of uses, that will be OK - but for rendering say, markdown text, Satori won't work. The upstream layout engine handles flexbox layout, and it's unclear if Facebook needs inline layout or if Vercel would pick it up and close the gap: https://github.com/facebook/yoga https://github.com/facebook/yoga Then again, for the main purpose Satori is advertised for - generating URL unfurl previews - Dropflow looks like it might be the answer.
- AaronFriel 3y agoDoes this depend on a browser? It looks like it doesn't - which is pretty impressive!
- pier25 3y agoDo you need to create images? It's trivial to create svg in the server. It's like rendering html.