简体   繁体   中英

How can I use a d3 library (like c3.js) on the server side to generate charts in nodejs?

I'm trying to generate charts using c3js, which is a d3 library for easier charting.

I see that you can use plain d3 to generate charts on the server side using jsdom since there is an npm module for d3. This is the guide I was following for that process: http://www.gregjopa.com/2013/11/render-svg-charts-server-side-with-d3-js/

However, there is no npm module for nvd3 or c3js.

How can I use these libraries on the server side to generate charts for use on the client side?

One library that does have a Node.js build is ZingChart . Trying the library is free, however the Node build is for licensed customers. Full disclosure, I'm on the ZingChart team. However if you'd like more info, feel free to reach out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM