From 42ade3ee3a1092e29add24b91ca2512322c51f60 Mon Sep 17 00:00:00 2001 From: Artem Babak Date: Wed, 22 Feb 2023 12:06:24 +0200 Subject: [PATCH 1/2] Digital Gauge fix in update() - change strict to loose inequality --- .../src/app/modules/home/components/widget/lib/digital-gauge.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts b/ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts index 7e3bb168ae..274c78b3ce 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts @@ -406,7 +406,7 @@ export class TbCanvasDigitalGauge { filter.transform(timestamp, this.localSettings.timestampFormat); } const value = tvPair[1]; - if (value !== this.gauge.value) { + if (value != this.gauge.value) { if (!this.gauge.options.animation) { this.gauge._value = value; } From bc1d9011c640c301837a3c14f3b6fde06f8d7460 Mon Sep 17 00:00:00 2001 From: Artem Babak Date: Thu, 23 Feb 2023 11:22:46 +0200 Subject: [PATCH 2/2] Widget Horizontal Bar: add parseFloat of value in update() --- .../app/modules/home/components/widget/lib/digital-gauge.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts b/ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts index 274c78b3ce..fcb90b06a4 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts @@ -405,8 +405,8 @@ export class TbCanvasDigitalGauge { (this.gauge.options as CanvasDigitalGaugeOptions).labelTimestamp = filter.transform(timestamp, this.localSettings.timestampFormat); } - const value = tvPair[1]; - if (value != this.gauge.value) { + const value = parseFloat(tvPair[1]); + if (value !== this.gauge.value) { if (!this.gauge.options.animation) { this.gauge._value = value; }