score:4

Accepted answer

the problem is in how you pass your data values to chart.js on this line:

datasets: [{label: 'data set', data: [storage]}],

specifically, data is supposed to be an array of objects. because you have added the square brackets ([]) you are passing an 'array of array of objects'.

the problem can be fixed simply by removing the brackets:

data: storage

Related Query