title: Passing Array to Chart.js not working, chart not rendering
body: <p>I am trying to display a chart by passing in arrays of data to Chart.js. If I pass arrays, the chart does not render at all; it's as if the arrays are all empty. If I hard code the values into the location where the arrays are, the chart renders fine.
  I'm new to JavaScript/TypeScript...
  I found these similar questions, but they don't seem to work in my situation:</p>
  
  <p><a href="https://stackoverflow.com/questions/40278334/array-not-working-correctly-in-chartjs">Array not working correctly in Chartjs</a></p>
  
  <p><a href="https://stackoverflow.com/questions/20266849/how-to-add-datas-to-chart-js-from-javascript-array-itself">How to add datas to chart js from javascript array itself?</a></p>
  
  <p>Here is my code. The chart does not render if I remove the hard coded arrays and un-comment the array variables.</p>
  
  <pre><code>  buildChart() {
  var momentArr = new Array(); var weightArr = new Array(); var bmiArr = new Array();
  this.weightList.forEach(elements =&gt; {
    elements.forEach(element =&gt; {
      momentArr.push(element.moment);
      weightArr.push(element.weight);
      bmiArr.push(element.bmi);
    });
  })
  
  console.log(momentArr);
  console.log(weightArr);
  console.log(bmiArr);
  
  this.weightChart = new Chart(this.weightCanvas.nativeElement, {
    type: 'line',
    data: {
      labels: [1500948156623,1500948161541], //momentArr,
      datasets: [
        {
          label: 'Weight',
          borderColor: "#3cba9f",
          fill: false,
          data: [300, 280] //weightArr
        },
        {
          label: 'BMI',
          borderColor: "#8e5ea2",
          fill: false,
          data: [150, 140] //bmiArr
        }
      ]
    },
    options: {
      scales: {
        xAxes: [{
          type: 'time',
          time: {
            displayFormats: {
              quarter: 'MMM YYYY'
            }
          }
        }],
        yAxes: [{
          type: 'linear',
          ticks: { beginAtZero: false}
        }]
      }
    }
  
  });
  }
  </code></pre>
  
  <p>FYI, weightList is a FirebaseListObservable.</p>