0👍
Chart.js is a javascript charting library, so you’d need to be able to run the javascript on the server, to produce the chart. This would require something like node or the ability to run javascript on the IIS server.
As you say, there’s an option to generate it in the browser, post it back to the server, then do what you need with it there (embed it in a document/pdf?). But that’s very much a hack.
As @John commented – you’re best off using something like System.Web.UI.DataVisualization.Charting
to produce the chart image on the server, then use that as needs be.
- Chartjs-ChartConfiguration missing 'time' parameter in 'options.scales.x'
- Chartjs-Switching between different Chart.js charts using the same canvas
Source:stackexchange.com