From ec5be9bfef1a56a5605bffcfbadd8ca00c19d45e Mon Sep 17 00:00:00 2001 From: Valeriia Koriavikova Date: Thu, 2 Jul 2026 18:21:15 +0300 Subject: [PATCH 1/4] Merge pull request #15847 from LeoMorgan113/feature/ticks-label-fix Fix chart axis ticks font size --- .../widget/lib/chart/time-series-chart.ts | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart.ts b/ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart.ts index ca2456e109..763c8d612d 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart.ts @@ -846,15 +846,29 @@ export class TbTimeSeriesChart { } } + private maxTickLabelHalfHeight(): number { + const axes = this.yAxisList.filter(a => a.settings.show && a.settings.showTickLabels); + if (!axes.length) { + return 0; + } + + const defaultSize = defaultTimeSeriesChartYAxisSettings.tickLabelFont.size; + const maxFontSize = Math.max(...axes.map(a => a.settings.tickLabelFont?.size || defaultSize)); + return Math.ceil(maxFontSize / 2); + } + private minTopOffset(): number { - const showTickLabels = - !!this.yAxisList.find(yAxis => yAxis.settings.show && yAxis.settings.showTickLabels); - return (this.topPointLabels) ? 25 : - (showTickLabels ? 10 : 5); + if (this.topPointLabels) { + return 25; + } + const half = this.maxTickLabelHalfHeight(); + return half ? Math.max(10, half) : 5; } private minBottomOffset(): number { - return this.settings.dataZoom ? 45 : 5; + const half = this.maxTickLabelHalfHeight(); + const minOffset = half ? Math.max(5, half) : 5; + return this.settings.dataZoom ? Math.max(45, minOffset) : minOffset; } private _onParentScroll() { @@ -883,6 +897,7 @@ export class TbTimeSeriesChart { this.updateBarsAnimation(barItems, false); } this.timeSeriesChart.resize(); + this.updateAxes(); if (this.animationEnabled()) { this.updateBarsAnimation(barItems, true); } From 751730acd3d4970bd9dc0fd7ba0c64f5af1e436f Mon Sep 17 00:00:00 2001 From: Maksym Tsymbarov Date: Thu, 2 Jul 2026 10:48:21 +0200 Subject: [PATCH 2/4] Added missing translation for Label and Value Card widget --- .../widget/lib/cards/label-value-card-widget.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/cards/label-value-card-widget.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/cards/label-value-card-widget.component.html index 289b54bb56..930fef4d42 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/cards/label-value-card-widget.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/cards/label-value-card-widget.component.html @@ -28,7 +28,7 @@
-
{{ valueText }}
+
{{ valueText | customTranslate }}
From 5493ac7da50a506693a5b5f1ac69d6eb27842b33 Mon Sep 17 00:00:00 2001 From: Maksym Tsymbarov Date: Thu, 2 Jul 2026 17:54:39 +0200 Subject: [PATCH 3/4] Fixed validation for Digital Gauge widget maxValue when it is zero (#15893) * Fixed validation for Digital Gauge widget maxValue when it is zero * Fixed check --- .../digital-simple-gauge-basic-config.component.ts | 11 +++++------ .../gauge/digital-gauge-widget-settings.component.ts | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/config/basic/gauge/digital-simple-gauge-basic-config.component.ts b/ui-ngx/src/app/modules/home/components/widget/config/basic/gauge/digital-simple-gauge-basic-config.component.ts index e0ca65cdea..6d837f476c 100644 --- a/ui-ngx/src/app/modules/home/components/widget/config/basic/gauge/digital-simple-gauge-basic-config.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/config/basic/gauge/digital-simple-gauge-basic-config.component.ts @@ -30,7 +30,7 @@ import { getTimewindowConfig, setTimewindowConfig } from '@home/components/widget/config/timewindow-config-panel.component'; -import { formatValue, isDefined, isUndefined } from '@core/utils'; +import { formatValue, isDefined, isDefinedAndNotNull, isNumeric, isUndefined } from '@core/utils'; import { Component } from '@angular/core'; import { convertLevelColorsSettingsToColorProcessor, @@ -189,11 +189,10 @@ export class DigitalSimpleGaugeBasicConfigComponent extends BasicWidgetConfigCom private maxValueValidation(): ValidatorFn { return (control: AbstractControl): ValidationErrors | null => { - const value: string = control.value; - if (value) { - if (value < control.parent?.get('minValue').value) { - return {maxValue: true}; - } + const value: number = control.value; + const minValue = control.parent?.get('minValue').value; + if (isNumeric(value) && isDefinedAndNotNull(minValue) && value < minValue) { + return {maxValue: true}; } return null; }; diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/digital-gauge-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/digital-gauge-widget-settings.component.ts index ff22abd28a..fe7eeb7305 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/digital-gauge-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/digital-gauge-widget-settings.component.ts @@ -37,7 +37,7 @@ import { digitalGaugeLayoutTranslations, DigitalGaugeType } from '@home/components/widget/lib/digital-gauge.models'; -import { formatValue, isDefined } from '@core/utils'; +import { formatValue, isDefined, isDefinedAndNotNull, isNumeric } from '@core/utils'; import { ColorSettings, ColorType, @@ -218,11 +218,10 @@ export class DigitalGaugeWidgetSettingsComponent extends WidgetSettingsComponent private maxValueValidation(): ValidatorFn { return (control: AbstractControl): ValidationErrors | null => { - const value: string = control.value; - if (value) { - if (value < control.parent?.get('minValue').value) { - return {maxValue: true}; - } + const value: number = control.value; + const minValue = control.parent?.get('minValue').value; + if (isNumeric(value) && isDefinedAndNotNull(minValue) && value < minValue) { + return {maxValue: true}; } return null; }; From 1302a67ee83b8b2b2f3e93bbf789a387d1c40acc Mon Sep 17 00:00:00 2001 From: Maksym Tsymbarov Date: Mon, 29 Jun 2026 14:17:52 +0200 Subject: [PATCH 4/4] Fixed Calculated Field test script running against stale entity values instead of current form input --- .../components/calculated-fields/calculated-field.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts b/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts index 4790789080..a80eb3439f 100644 --- a/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts +++ b/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts @@ -132,7 +132,7 @@ export class CalculatedFieldComponent extends EntityComponent { return this.cfFormService.testScript( this.entity?.id?.id, - this.entityValue, + this.entityFormValue(), this.entitiesTableConfig.getTestScriptDialog.bind(this.entitiesTableConfig), this.destroyRef, expression