I use this code to take the names of tasks into my array barChartLabels.
public lineChartLabels: Label[] = [];
this.tasks.pipe(map(x => x.map(x => x.id))).toPromise().then(id => this.lineChartLabels.push(id))
The code is still working but there is a little problem with it. In fact it copy all names into the first index of lineChartLabels. I expect each name to be written in its own index of the array. How can i change the code to put each name in a single index?