Chartjs-Dynamic Chart Data

0👍

I think changing

console.log("ARRAY BEING RETURNED "+pieChartData);
this.dataExtracted = pieChartData;

to

console.log("ARRAY BEING RETURNED "+pieChartData);
this.pieChartData = this.dataExtracted = pieChartData;

will do.

When you assign this.pieChartData = this.dataExtracted, doesn’t mean that when you do this.dataExtracted = something else, this.pieChartData will be the same value automatically. In fact it will point to the same old object as previously.

Leave a comment