title: Uncaught TypeError: Cannot read property 'draw' of undefined
body: <pre><code>   for (var i = 0; i &lt; reduced.length; i++) {
  
  
  
    var innerdata = [];
    for (var j = 0; j &lt; days.length; j++) {
  
      var rev = 0;
  
      _.each(reduced[i].data, function(timerevenueObj) {
  
        var current = new Date(parseInt(timerevenueObj[0]));
        var daysweek = days[j];
  
        if (current.toDateString() === daysweek.toDateString()) {
          rev = rev + timerevenueObj[1];
        }
  
  
  
      });
  
      innerdata.push(rev);
  
  
    }
  
  
  
  
    datasets.push({
      label: reduced[i].label,
      fillColor: "rgba(220,220,220,0.2)",
      strokeColor: "rgba(220,220,220,1)",
      pointColor: "rgba(220,220,220,1)",
      pointStrokeColor: "#fff",
      pointHighlightFill: "#fff",
      pointHighlightStroke: "rgba(220,220,220,1)",
      data: innerdata
    });
  
  
  
   }
  
  
  
  
   data.push({
  
      labels: ["May 17","May 18","May 19","May 20","May 21","May 22","May 23","May 24","May 25","May 26","May 27"],
      datasets: datasets
  
    });
  </code></pre>
  
  <p>reduced is an array of Objects with the following format:</p>
  
  <p>Channel 1 </p>
  
  <pre><code>  CreateTime
    Revenue
  
    CreateTime
    Revenue
  </code></pre>
  
  <p>Channel2 </p>
  
  <pre><code> CreateTime
   Revenue
  
   CreateTime
   Revenue
  </code></pre>
  
  <p>Format of Data:</p>
  
  <p><img src="https://i.stack.imgur.com/4DSni.png" alt="enter image description here"></p>
  
  <p>I am getting an error when trying to display a Line Chart </p>