Skip to content

Commit

Permalink
Pull request #5332: Bugfix/DXCF-5668 tdw missing localization
Browse files Browse the repository at this point in the history
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: 90ca4966dc878e834b8a7f4741af3d0dd6f66e43
  • Loading branch information
Keelaro1 authored and dxcity committed Dec 11, 2024
1 parent 20a2da2 commit 08b9b3c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/chart/chart.config.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -1148,6 +1153,7 @@ export interface ChartConfigComponentsHighLow {
* Font config of high/low labels.
*/
font: string;
prefix: { high: string; low: string };
}
export interface ChartConfigComponentsCrossTool {
/**
Expand Down
8 changes: 7 additions & 1 deletion src/chart/components/high_low/high-low.drawer.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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}`;
}

Expand Down

0 comments on commit 08b9b3c

Please sign in to comment.