Chart.js 2.0 - How to?

FWIW, here is a datapoint. It’s not Ionic, but I do have an Angular2 application (using RC1) that uses chart.js version 2.1.2. I have the following line in a TypeScript file:

var Chart = require<any>('chart.js/src/chart');

I use @ViewChild to grab the canvas element, and pass its nativeElement member as the first argument to the Chart constructor. It works.

1 Like