I'm trying to get the sample charts provided by http://jtblin.github.io/angular-chart.js . In particular the line chart This is the dataset and labels.
$scope.data = [[154, 31, 17, 4, 1]];
$scope.labels = ["A", "B", "C", "D", "E"];
This is the html template.
<canvas id="line" class="chart chart-line" chart-data="data" chart-labels="labels" chart-click="onClick">
I'm using Chart js version 1.0.2.
I keep hitting the error :
Uncaught TypeError: Cannot read property 'draw' of undefined .
EDIT : On debugging i found that this.scale within the draw property is undefined and it could be an issue where in the script is loaded before the canvas element is ready.
But i still don't quite know how to solve this. Any help will be appreciated.Thanks