Chartjs-Ng2-chart with Angular 4: Can't bind to 'data' since it isn't a known property of 'canvas'

2👍

After serveral hours of try and error i got it working. I changed the following things:

app.module.ts:

import { ChartsModule } from 'ng2-charts';

system.js:

map: {
    ...
    'ng2-charts': 'npm:ng2-charts/bundles'
},
packages: {
    ...
    'ng2-charts': {
         main: 'ng2-charts.umd.min.js',
         defaultExtension: 'js'
    }
}

Leave a comment