[Chartjs]-How to reset chart.js chart yAxes count on tab change in angular?

1👍

You need to also re-initialize recruitingChartData each time a new tab is selected. This can be done inside getDashboardMainData as follows.

async getDashboardMainData(request): Promise<void> {
  ...
  this.recruitingChartData.forEach(o => o.data = []);

Please take a look at your amended StackBlitz and see how it works.

Leave a comment