From fd7c7e9b519443b2fac6cd9d73ae0e9145d437c9 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Wed, 17 Apr 2024 18:30:49 +0300 Subject: [PATCH] UI: Improve time series chart tooltip configuration - added font/color settings for tooltip label. --- ...art-with-labels-basic-config.component.html | 15 +++++++++++++++ ...chart-with-labels-basic-config.component.ts | 8 ++++++++ .../range-chart-basic-config.component.html | 18 ++++++++++++++++-- .../range-chart-basic-config.component.ts | 8 ++++++++ ...me-series-chart-basic-config.component.html | 15 +++++++++++++++ ...time-series-chart-basic-config.component.ts | 9 +++++++++ .../bar-chart-with-labels-widget.models.ts | 11 +++++++++++ .../widget/lib/chart/echarts-widget.models.ts | 15 ++++++++------- .../lib/chart/range-chart-widget.models.ts | 11 +++++++++++ .../lib/chart/time-series-chart.models.ts | 9 +++++++++ ...-with-labels-widget-settings.component.html | 15 +++++++++++++++ ...rt-with-labels-widget-settings.component.ts | 6 ++++++ .../range-chart-widget-settings.component.html | 15 +++++++++++++++ .../range-chart-widget-settings.component.ts | 6 ++++++ ...series-chart-widget-settings.component.html | 15 +++++++++++++++ ...e-series-chart-widget-settings.component.ts | 7 +++++++ .../assets/locale/locale.constant-en_US.json | 1 + 17 files changed, 175 insertions(+), 9 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/config/basic/chart/bar-chart-with-labels-basic-config.component.html b/ui-ngx/src/app/modules/home/components/widget/config/basic/chart/bar-chart-with-labels-basic-config.component.html index fa0932175c..6f263f05d3 100644 --- a/ui-ngx/src/app/modules/home/components/widget/config/basic/chart/bar-chart-with-labels-basic-config.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/config/basic/chart/bar-chart-with-labels-basic-config.component.html @@ -239,10 +239,24 @@ +
+
{{ 'tooltip.label' | translate }}
+
+ + + + +
+
{{ 'tooltip.value' | translate }}
+
+
{{ 'tooltip.label' | translate }}
+
+ + + + +
+
{{ 'tooltip.value' | translate }}
-
-
+
{{ 'tooltip.date' | translate }} @@ -321,6 +334,7 @@ {{ 'tooltip.trigger-axis' | translate }}
+
+
{{ 'tooltip.label' | translate }}
+
+ + + + +
+
{{ 'tooltip.value' | translate }}
item.piece) }, showTooltip: settings.showTooltip, + tooltipLabelFont: settings.tooltipLabelFont, + tooltipLabelColor: settings.tooltipLabelColor, tooltipValueFont: settings.tooltipValueFont, tooltipValueColor: settings.tooltipValueColor, tooltipShowDate: settings.tooltipShowDate, diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart.models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart.models.ts index bfe65a0d7c..4fdc8063aa 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart.models.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart.models.ts @@ -752,6 +752,15 @@ export const timeSeriesChartDefaultSettings: TimeSeriesChartSettings = { timeSeriesChartNoAggregationBarWidthDefaultSettings), showTooltip: true, tooltipTrigger: EChartsTooltipTrigger.axis, + tooltipLabelFont: { + family: 'Roboto', + size: 12, + sizeUnit: 'px', + style: 'normal', + weight: '400', + lineHeight: '16px' + }, + tooltipLabelColor: 'rgba(0, 0, 0, 0.76)', tooltipValueFont: { family: 'Roboto', size: 12, diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/bar-chart-with-labels-widget-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/bar-chart-with-labels-widget-settings.component.html index 4123df9c9f..04b2bff29c 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/bar-chart-with-labels-widget-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/bar-chart-with-labels-widget-settings.component.html @@ -160,10 +160,24 @@ +
+
{{ 'tooltip.label' | translate }}
+
+ + + + +
+
{{ 'tooltip.value' | translate }}
+
+
{{ 'tooltip.label' | translate }}
+
+ + + + +
+
{{ 'tooltip.value' | translate }}
{{ 'tooltip.trigger-axis' | translate }}
+
+
{{ 'tooltip.label' | translate }}
+
+ + + + +
+
{{ 'tooltip.value' | translate }}