From 0eb9c11337f5992fe92fc1217b655a7e51d1a12a Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Fri, 10 Jan 2025 15:07:33 +0300 Subject: [PATCH] fix(Highcharts plugin): fix inner var name TOOLTIP_ROW_NAME_CLASS_NANE -> TOOLTIP_ROW_NAME_CLASS_NAME --- src/plugins/highcharts/renderer/helpers/config/config.js | 4 ++-- .../highcharts/renderer/helpers/highcharts/highcharts.js | 4 ++-- src/plugins/yagr/renderer/tooltip/tooltip.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/highcharts/renderer/helpers/config/config.js b/src/plugins/highcharts/renderer/helpers/config/config.js index 43740d60..029be8f9 100644 --- a/src/plugins/highcharts/renderer/helpers/config/config.js +++ b/src/plugins/highcharts/renderer/helpers/config/config.js @@ -27,7 +27,7 @@ import formatTooltip, { TOOLTIP_HEADER_CLASS_NAME, TOOLTIP_LIST_CLASS_NAME, TOOLTIP_ROW_CLASS_NAME, - TOOLTIP_ROW_NAME_CLASS_NANE, + TOOLTIP_ROW_NAME_CLASS_NAME, } from '../tooltip'; import {handleLegendItemClick} from './handleLegendItemClick'; @@ -176,7 +176,7 @@ export function synchronizeTooltipTablesCellsWidth(tooltipContainer, isMobile) { } if (isMobile && tooltipOverflowsViewport) { - const rowNamesNodes = tooltipContainer.querySelectorAll(`.${TOOLTIP_ROW_NAME_CLASS_NANE}`); + const rowNamesNodes = tooltipContainer.querySelectorAll(`.${TOOLTIP_ROW_NAME_CLASS_NAME}`); for (let i = 0; i < rowNamesNodes.length; i++) { const node = rowNamesNodes[i]; diff --git a/src/plugins/highcharts/renderer/helpers/highcharts/highcharts.js b/src/plugins/highcharts/renderer/helpers/highcharts/highcharts.js index e22b3644..dda38173 100644 --- a/src/plugins/highcharts/renderer/helpers/highcharts/highcharts.js +++ b/src/plugins/highcharts/renderer/helpers/highcharts/highcharts.js @@ -15,7 +15,7 @@ import { TOOLTIP_FOOTER_CLASS_NAME, TOOLTIP_LIST_CLASS_NAME, TOOLTIP_ROW_CLASS_NAME, - TOOLTIP_ROW_NAME_CLASS_NANE, + TOOLTIP_ROW_NAME_CLASS_NAME, } from '../tooltip'; import colors from './colors'; @@ -334,7 +334,7 @@ function initHighcharts({isMobile}) { } if (isFixation) { - const rowNames = this.container.querySelectorAll(`.${TOOLTIP_ROW_NAME_CLASS_NANE}`); + const rowNames = this.container.querySelectorAll(`.${TOOLTIP_ROW_NAME_CLASS_NAME}`); for (let i = 0; i < rowNames.length; i++) { const rowNameNode = rowNames[i]; diff --git a/src/plugins/yagr/renderer/tooltip/tooltip.ts b/src/plugins/yagr/renderer/tooltip/tooltip.ts index 81dd70ac..077e0cf0 100644 --- a/src/plugins/yagr/renderer/tooltip/tooltip.ts +++ b/src/plugins/yagr/renderer/tooltip/tooltip.ts @@ -10,7 +10,7 @@ import './tooltip.scss'; const SERIES_NAME_DATA_ATTRIBUTE = 'data-series-name'; const SERIES_IDX_DATA_ATTRIBUTE = 'data-series-idx'; const TOOLTIP_CONTAINER_CLASS_NAME = '_tooltip'; -const TOOLTIP_ROW_NAME_CLASS_NANE = '_tooltip-rows__name-td'; +const TOOLTIP_ROW_NAME_CLASS_NAME = '_tooltip-rows__name-td'; const TOOLTIP_ROW_CLASS_NAME = '_tooltip-row'; const TOOLTIP_HEADER_CLASS_NAME = '_tooltip-header'; const TOOLTIP_LIST_CLASS_NAME = '_tooltip-list'; @@ -24,7 +24,7 @@ const renderColorCell = (line: TooltipLine) => `; const renderNameCell = (line: TooltipLine) => - ` + ` ${line.hideSeriesName ? '' : escapeHTML(line.seriesName)} `;