From be771f9d61d6ce9648bfb1f80a36020411b18cdf Mon Sep 17 00:00:00 2001 From: Dhoni77 Date: Sat, 28 Oct 2023 19:23:32 +0530 Subject: [PATCH] feat: add decimation plugin to chart --- libs/ui/src/lib/line-chart/line-chart.component.ts | 5 +++++ 1 file changed, 5 insertions(+) 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 c6eb68cec..45712dd63 100644 --- a/libs/ui/src/lib/line-chart/line-chart.component.ts +++ b/libs/ui/src/lib/line-chart/line-chart.component.ts @@ -49,6 +49,7 @@ export class LineChartComponent implements AfterViewInit, OnChanges, OnDestroy { @Input() benchmarkLabel = ''; @Input() colorScheme: ColorScheme; @Input() currency: string; + @Input() dataDecimation = false; @Input() historicalDataItems: LineChartItem[]; @Input() isAnimated = false; @Input() locale: string; @@ -209,6 +210,10 @@ export class LineChartComponent implements AfterViewInit, OnChanges, OnDestroy { tooltip: this.getTooltipPluginConfiguration(), verticalHoverLine: { color: `rgba(${getTextColor(this.colorScheme)}, 0.1)` + }, + decimation: { + enabled: this.dataDecimation, + algorithm: 'min-max' } }, scales: {