diff --git a/libs/ui/src/lib/line-chart/line-chart.component.ts b/libs/ui/src/lib/line-chart/line-chart.component.ts index 18062b336..40ff6b94b 100644 --- a/libs/ui/src/lib/line-chart/line-chart.component.ts +++ b/libs/ui/src/lib/line-chart/line-chart.component.ts @@ -76,7 +76,7 @@ export class GfLineChartComponent @ViewChild('chartCanvas') chartCanvas: ElementRef; - public chart: Chart<'line', Array, string>; + public chart: Chart<'line', (number | Point | null)[], string>; public isLoading = true; private readonly ANIMATION_DURATION = 1200; @@ -124,9 +124,9 @@ export class GfLineChartComponent private initialize() { this.isLoading = true; - const benchmarkPrices: Array = []; + const benchmarkPrices: (number | Point | null)[] = []; const labels: string[] = []; - const marketPrices: Array = []; + const marketPrices: (number | Point | null)[] = []; this.historicalDataItems?.forEach((historicalDataItem, index) => { const label = historicalDataItem.date; @@ -167,7 +167,7 @@ export class GfLineChartComponent gradient.addColorStop(1, getBackgroundColor(this.colorScheme)); } - const data: ChartData<'line', Array, string> = { + const data: ChartData<'line', (number | Point | null)[], string> = { labels, datasets: [ { @@ -213,7 +213,7 @@ export class GfLineChartComponent this.chart.update(); } else { - this.chart = new Chart<'line', Array, string>( + this.chart = new Chart<'line', (number | Point | null)[], string>( this.chartCanvas.nativeElement, { data,