title: Uncaught TypeError: Cannot read property 'draw' of undefined : Angular chart js
body: <p>I'm trying to get the sample charts provided by <a href="http://jtblin.github.io/angular-chart.js" rel="nofollow">http://jtblin.github.io/angular-chart.js</a> . In particular the line chart
  This is the dataset and labels.</p>
  
  <pre><code>$scope.data = [[154, 31, 17, 4, 1]];
  $scope.labels = ["A", "B", "C", "D", "E"];
  </code></pre>
  
  <p>This is the html template.</p>
  
  <pre><code>&lt;canvas id="line" class="chart chart-line" chart-data="data" chart-labels="labels" chart-click="onClick"&gt;
  </code></pre>
  
  <p></p>
  
  <p>I'm using Chart js version 1.0.2. </p>
  
  <p>I keep hitting the error : </p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'draw' of undefined .</p>
  </blockquote>
  
  <p>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. </p>
  
  <p>But i still don't quite know how to solve this.
  Any help will be appreciated.Thanks</p>