score:0

i didn't read too deeply into your code but i noticed that you have your node.js code in the head of the file. unfortunately, node.js cannot be executed in the browser, but is used for server side implementation of code. what does your console say?

score:0

here is what i had to do.

i copied the charts.min.js file from the node_modules to the public folder.

other than that, i have the canvas at the top. also, i had to change the:

var ctx = document.getelementbyid("mychart").getcontext("2d");

to

var ctx = document.getelementbyid('mychart').getcontext('2d');


Related Query

More Query from same tag