Chartjs-Chart data will not load in ng2-charts/Chart.JS

0👍

  1. Open your DevTools and check if there are any errors in your console.
  2. Do a console.log(this.tempData) and console.log(this.timeData) and check if these variables have the same data format as your "static" data that worked.

0👍

Your problem is, that the Chart doesn’t notice that the data in the array has changed. You can reinitialize the data and then the chart gets an auto-refresh.

this.tempData = {...this.tempData}

If you still have the problem it would be nice if you provide the data of the console.log statements.

Leave a comment