Chartjs-Angular4 ng2-charts TypeError: Cannot read property 'length' of undefined

0πŸ‘

βœ…

It seems like you are passing an array of data to the datasets field, this does not work you need to pass an array of dataset objects which contain the data array.

basic dataset object:

{
    label: '# of Points',
    data: [7, 11, 5, 8, 3, 7],
}

Leave a comment