From 487f67180cfa473b8d554cd7149d7b90967db79d Mon Sep 17 00:00:00 2001 From: Annika Nowak Date: Wed, 29 Nov 2023 16:49:43 +0100 Subject: [PATCH] fix: diagram color range fix --- .../src/lib/core/components/diagram/diagram.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/portal-integration-angular/src/lib/core/components/diagram/diagram.component.ts b/libs/portal-integration-angular/src/lib/core/components/diagram/diagram.component.ts index c435ac6e..4dfb9854 100644 --- a/libs/portal-integration-angular/src/lib/core/components/diagram/diagram.component.ts +++ b/libs/portal-integration-angular/src/lib/core/components/diagram/diagram.component.ts @@ -39,7 +39,7 @@ export class DiagramComponent implements OnInit, OnChanges { const inputData = this.data.map((diagramData) => diagramData.value) this.amountOfData = this.data.reduce((acc, current) => acc + current.value, 0) - const COLORS = interpolateColors(this.amountOfData, colorScale, colorRangeInfo) + const COLORS = interpolateColors(this.data.length, colorScale, colorRangeInfo) this.chartData = { labels: this.data.map((data) => data.label), datasets: [