i have an array to be mapped to an array to show in graph, the array values change when we change the date, But for me the new value is added with the previous value,
let salesToday_result = self.graphPlotting(res.today);
salesToday_result[0].map(item =>{self.salesChartLabels.push(moment(moment.utc(item).toDate()).format("hh A"))})
self.salesChartData[0]['data'] = salesToday_result[1];
console.log('self.salesChartLabels',self.salesChartLabels)
As you can see in the image below,
24hr Data is added every time i change the date
How it can be solved,(if more code needed,can be provided)


