From 881d6c7e9ceead417e0bb7dd4af8803479b27a18 Mon Sep 17 00:00:00 2001 From: Anton Vorobev Date: Fri, 25 Oct 2024 09:03:50 +0000 Subject: [PATCH] Pull request #5332: Bugfix/DXCF-5668 tdw missing localization Merge in DXCHARTS/dxchart5 from bugfix/DXCF-5668-tdw-missing-localization to master * commit 'b318dda6d9daa5c3e166b6c35226598737084c75': [DXCF-5668] TDW - Missing localization // pr fix [DXCF-5668] TDW - Missing localization // pr fix [DXCF-5668] TDW - Missing localization // pr fix [DXCF-5668] TDW - Missing localization // pr fix [DXCF-5668] TDW - Missing localization // pr fix [DXCF-5668] TDW - Missing localization // pr fix [DXCF-5668] TDW - Missing localization // init [DXCF-5668] TDW - Missing localization // init [DXCF-5668] TDW - Missing localization // init [DXCF-5668] TDW - Missing localization // init GitOrigin-RevId: a5d69acbb8e6518df10014c1ac9a6353cdac3beb --- src/chart/chart.config.ts | 8 +++++++- src/chart/components/high_low/high-low.drawer.ts | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/chart/chart.config.ts b/src/chart/chart.config.ts index b2e311b..45cf8d6 100644 --- a/src/chart/chart.config.ts +++ b/src/chart/chart.config.ts @@ -1,3 +1,8 @@ +/* + * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. + * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ /* * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. @@ -231,7 +236,7 @@ export const getDefaultConfig = (): FullChartConfig => ({ logoWidth: 20, logoHeight: 20, }, - highLow: { visible: false, font: '12px sans-serif' }, + highLow: { visible: false, font: '12px sans-serif', prefix: { high: 'H: ', low: 'L: ' } }, highlights: { visible: false, fontFamily: 'Open Sans', @@ -1148,6 +1153,7 @@ export interface ChartConfigComponentsHighLow { * Font config of high/low labels. */ font: string; + prefix: { high: string; low: string }; } export interface ChartConfigComponentsCrossTool { /** diff --git a/src/chart/components/high_low/high-low.drawer.ts b/src/chart/components/high_low/high-low.drawer.ts index 81a3a69..dfe8187 100644 --- a/src/chart/components/high_low/high-low.drawer.ts +++ b/src/chart/components/high_low/high-low.drawer.ts @@ -1,3 +1,8 @@ +/* + * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited + * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. + * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ /* * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. @@ -84,7 +89,8 @@ export class HighLowDrawer implements Drawer { */ private getMarkerText(yValue: number, type: MarkerType): string { const formattedValue = this.chartModel.pane.regularFormatter(yValue); - const prefix = type === 'high' ? 'H:' : 'L:'; + const prefix = + type === 'high' ? this.config.components.highLow.prefix.high : this.config.components.highLow.prefix.low; return `${prefix} ${formattedValue}`; }