Cześć uczę się wykresów i mam taki problem dziwny dlaczego gdy zmieniam wartośći z this.dates na this.Dates które są wartościami Input wykres jest pusty patrząć na konsoli dane są takie same :(
@Input() Value = [];
@Input() Dates = [];
dates = [];
values = [];
lieChartLabels: Label[] = this.dates;
lieChartData: MultiDataSet = [this.values];
lieChartType: ChartType = 'line';
ngOnInit(): void {
this.service.getDailyTenureAdd().subscribe(x => {
x.payload.forEach(x => {
this.values.push(x.countTenures);
this.dates.push(x.createdAt);
});
});
console.log(this.dates);
console.log(this.Dates);
}
Wynik w konsoli:
https://zapodaj.net/83bf8af9ee459.png.html