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

More Query from same tag