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}`; }