title: Why chartJs throws length of undefined although everything seems correct
body: <p>I have very basic chart object contains xAxis array for chartData and yAxis for chartLabels like below</p>
  <pre><code>  public charts=[
      {
        xAxis : [
       1,2,3,4,5,6
        ],
         yAxis : [
        10,11,12,13,14,15
        ]
      },
      {
         xAxis : [
       2,2,4,7,8,9
        ],
         yAxis : [
        11,15,14,33,24,16
        ]
      } 
    ]
  </code></pre>
  <p>And here its the way how I iterate them and create canvas on HTML side</p>
  <pre><code>&lt;div id=&quot;chart-container&quot; *ngIf=&quot;charts&quot;&gt;
    &lt;ng-container *ngFor=&quot;let item of charts&quot;&gt;
      &lt;canvas  id=&quot;canvas&quot; baseChart [chartType]=&quot;chartType&quot; [datasets]=&quot;item.xAxis&quot; [labels]=&quot;item.yAxis&quot;  [options]=&quot;chartOptions&quot;&gt;&lt;/canvas&gt;
    &lt;/ng-container&gt;
  &lt;/div&gt;
  </code></pre>
  <p>But it throws ERROR like below</p>
  <pre><code>Error: Cannot read property 'length' of undefined
  </code></pre>
  <p>I dont know really why it happens.I hope someone can solve this and help me</p>
  <p>Stackblitz example : <a href="https://stackblitz.com/edit/line-chart-nlucvd?file=app/app.component.ts" rel="nofollow noreferrer">https://stackblitz.com/edit/line-chart-nlucvd?file=app/app.component.ts</a></p>