From 700aeba963983d01c8ccba2367d1d1fb71753ab7 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Thu, 19 Oct 2023 16:17:06 +0300 Subject: [PATCH] UI: Improve min/max ticks formatting for value chart card widget. --- .../lib/cards/aggregated-value-card-widget.component.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/cards/aggregated-value-card-widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/cards/aggregated-value-card-widget.component.ts index 5380874811..b5b37df7f8 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/cards/aggregated-value-card-widget.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/cards/aggregated-value-card-widget.component.ts @@ -179,12 +179,10 @@ export class AggregatedValueCardWidgetComponent implements OnInit, AfterViewInit } as TbFlotSettings; this.flot = new TbFlot(this.ctx, 'line', $(this.chartElement.nativeElement), settings); this.tickMin$ = this.flot.yMin$.pipe( - map((value) => formatValue(value, (this.flotDataKey?.decimals || this.ctx.decimals), - (this.flotDataKey?.units || this.ctx.units)) + map((value) => formatValue(value, (this.flotDataKey?.decimals || this.ctx.decimals)) )); this.tickMax$ = this.flot.yMax$.pipe( - map((value) => formatValue(value, (this.flotDataKey?.decimals || this.ctx.decimals), - (this.flotDataKey?.units || this.ctx.units)) + map((value) => formatValue(value, (this.flotDataKey?.decimals || this.ctx.decimals)) )); } if (this.settings.autoScale && this.showValues) {