6👍
✅
Actually [datasets]="lineChartData"
has two types. One is number[]
and other is ChartPoint[]
so to store data as number we need to type-cast data as
(this.lineChartData[0].data as number[]).push(1)
HTML
<div style="display: block;">
<canvas #myChart baseChart [datasets]="lineChartData"></canvas>
</div>
Source:stackexchange.com