SeanSobey / ChartjsNodeCanvas

A node renderer for Chart.js using canvas.
MIT License
230 stars 78 forks source link

How can I use ChartJS-Node-Canvas in react or front end application? #99

Open DipaliShah1193 opened 2 years ago

typpo commented 2 years ago

For a frontend application, I would suggest constructing the chart normally with Chart.js and using the built-in toBase64Image function to get a PNG or JPEG image of the chart.

SeanSobey commented 2 years ago

Yes, this library is a kit specifically for running Chartjs on Nodejs. Chartjs is a front end based library so you can use it as is or a wrapper like this for easy integration into react (based on a quick search, I have not used this).

Only if you looking to render the charts server-side for some specific reason, or are maybe doing server-side rendering of pages should you look to use this lib.