[Chartjs]-Example: Doughnut | Error: Uncaught ReferenceError: Utils is not defined

5👍

Utils is a helper file chart.js uses and makes internally to generate datasets and some more things, it was removed as a public source in chart.js version 3, if you want to use it you can download it here: (https://github.com/chartjs/Chart.js/blob/master/docs/scripts/utils.js) or get the online file here: (https://www.chartjs.org/samples/2.9.4/utils.js)

If you want a good starting point/example you can copy the code from the usage page, there is the chart code for a basic chart where you don’t need anything else for: https://www.chartjs.org/docs/master/getting-started/usage.html

Leave a comment