Server side chart rendering using d3

660 views
Skip to first unread message

Sachin Jain

unread,
Oct 6, 2017, 10:06:38 AM10/6/17
to d3-js
Hi,

I know d3 is used to render charts on client side using JavaScript.
I am wondering if there is a server side equivalent for same.

Can we use d3 on server side to render charts? Has anybody done such kind of work?
Are there any libraries that can be used on server side to render charts?

Any pointers in this direction would be appreciable.

Thanks in advance,
Sachin

Japhy Bartlett

unread,
Oct 6, 2017, 3:10:12 PM10/6/17
to d3...@googlegroups.com
You can use something like phantomJS to do this if you want some kind of raster output:



If you just want a raw SVG, you could probably use node, but I'm not super familiar with how that would work offhand.

It's kind of a weird fit, D3 might not be the best if you want to generate static charts server side.; it's strongest at dynamic, interactive visualizations.






--
You received this message because you are subscribed to the Google Groups "d3-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sachin Jain

unread,
Oct 9, 2017, 1:53:49 AM10/9/17
to d3-js
Thanks Japhy for suggestion. Actually I am looking for library that can be used on Java Server. 
Specifically if there is a way to use d3 on server side without Node.js as we are already using d3 on client side to generate dynamic charts.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+un...@googlegroups.com.

Drew Winget

unread,
Oct 9, 2017, 2:08:58 PM10/9/17
to d3...@googlegroups.com
D3 is a javascript library, so you will need a javascript runtime to use it. This would also need to provide a DOM API if using any DOM elements, and a canvas API if rendering to canvas.

There are some java-based javascript runtimes, but the waters are somewhat uncharted and the communities small compared to using phantom with node. It's rather simple and can always be shelled out and the results fed into your JAVA-based system through saved files.

If you really want to run d3 inside of javascript inside of Java, have a look at:

To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Drew Winget
Visualisation Engineer
Digital Library Systems and Services
Stanford, CA 94305

Reply all
Reply to author
Forward
0 new messages