@gravity-ui/chartkit 5.19.1 → 5.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ import { i18n } from '../../../../../i18n';
13
13
  import { block } from '../../../../../utils/cn';
14
14
  import { formatNumber } from '../../../../shared';
15
15
  import { drawComments, drawOnlyRendererComments, getCommentsOnLine, hideComments, } from '../comments/drawing';
16
- import formatTooltip, { SERIES_NAME_DATA_ATTRIBUTE, TOOLTIP_CONTAINER_CLASS_NAME, TOOLTIP_FOOTER_CLASS_NAME, TOOLTIP_HEADER_CLASS_NAME, TOOLTIP_LIST_CLASS_NAME, TOOLTIP_ROW_CLASS_NAME, TOOLTIP_ROW_NAME_CLASS_NANE, } from '../tooltip';
16
+ import formatTooltip, { SERIES_NAME_DATA_ATTRIBUTE, TOOLTIP_CONTAINER_CLASS_NAME, TOOLTIP_FOOTER_CLASS_NAME, TOOLTIP_HEADER_CLASS_NAME, TOOLTIP_LIST_CLASS_NAME, TOOLTIP_ROW_CLASS_NAME, TOOLTIP_ROW_NAME_CLASS_NAME, } from '../tooltip';
17
17
  import { handleLegendItemClick } from './handleLegendItemClick';
18
18
  import defaultOptions from './options';
19
19
  import { addShowInNavigatorToSeries, buildNavigatorFallback, calculatePrecision, checkTooltipPinningAvailability, concatStrings, getFormatOptionsFromLine, getSortedData, isSafari, isTooltipShared, mergeArrayWithObject, numberFormat, setNavigatorDefaultPeriod, } from './utils';
@@ -121,7 +121,7 @@ export function synchronizeTooltipTablesCellsWidth(tooltipContainer, isMobile) {
121
121
  cell.setAttribute('style', `width: ${nodeWithWidesRowsCellsWidth[j]}px`);
122
122
  }
123
123
  if (isMobile && tooltipOverflowsViewport) {
124
- const rowNamesNodes = tooltipContainer.querySelectorAll(`.${TOOLTIP_ROW_NAME_CLASS_NANE}`);
124
+ const rowNamesNodes = tooltipContainer.querySelectorAll(`.${TOOLTIP_ROW_NAME_CLASS_NAME}`);
125
125
  for (let i = 0; i < rowNamesNodes.length; i++) {
126
126
  const node = rowNamesNodes[i];
127
127
  node.setAttribute('style', `max-width: ${nodeWithWidesRowsCellsWidth[1]}px`);
@@ -3,7 +3,7 @@ import Highcharts from 'highcharts';
3
3
  import get from 'lodash/get';
4
4
  import { i18n } from '../../../../../i18n';
5
5
  import { getTooltipPositioner, handleScroll, hideFixedTooltip, synchronizeTooltipTablesCellsWidth, } from '../config/config';
6
- import { TOOLTIP_CONTAINER_CLASS_NAME, TOOLTIP_FOOTER_CLASS_NAME, TOOLTIP_LIST_CLASS_NAME, TOOLTIP_ROW_CLASS_NAME, TOOLTIP_ROW_NAME_CLASS_NANE, } from '../tooltip';
6
+ import { TOOLTIP_CONTAINER_CLASS_NAME, TOOLTIP_FOOTER_CLASS_NAME, TOOLTIP_LIST_CLASS_NAME, TOOLTIP_ROW_CLASS_NAME, TOOLTIP_ROW_NAME_CLASS_NAME, } from '../tooltip';
7
7
  import colors from './colors';
8
8
  import { calculateClosestPointManually } from './utils';
9
9
  function formatQ(timestamp) {
@@ -276,7 +276,7 @@ function initHighcharts({ isMobile }) {
276
276
  synchronizeTooltipTablesCellsWidth(this.container, isMobile);
277
277
  }
278
278
  if (isFixation) {
279
- const rowNames = this.container.querySelectorAll(`.${TOOLTIP_ROW_NAME_CLASS_NANE}`);
279
+ const rowNames = this.container.querySelectorAll(`.${TOOLTIP_ROW_NAME_CLASS_NAME}`);
280
280
  for (let i = 0; i < rowNames.length; i++) {
281
281
  const rowNameNode = rowNames[i];
282
282
  if (rowNameNode.scrollWidth > rowNameNode.clientWidth) {
@@ -5,7 +5,7 @@ import './tooltip.css';
5
5
  const SERIES_NAME_DATA_ATTRIBUTE = 'data-series-name';
6
6
  const SERIES_IDX_DATA_ATTRIBUTE = 'data-series-idx';
7
7
  const TOOLTIP_CONTAINER_CLASS_NAME = '_tooltip';
8
- const TOOLTIP_ROW_NAME_CLASS_NANE = '_tooltip-rows__name-td';
8
+ const TOOLTIP_ROW_NAME_CLASS_NAME = '_tooltip-rows__name-td';
9
9
  const TOOLTIP_ROW_CLASS_NAME = '_tooltip-row';
10
10
  const TOOLTIP_HEADER_CLASS_NAME = '_tooltip-header';
11
11
  const TOOLTIP_LIST_CLASS_NAME = '_tooltip-list';
@@ -14,7 +14,7 @@ const renderEmptyCell = () => '<td />';
14
14
  const renderColorCell = (line) => `<td class="_tooltip-rows__bubble-td">
15
15
  <div class="_tooltip-rows__bubble-div" style="background-color:${line.seriesColor};"></div>
16
16
  </td>`;
17
- const renderNameCell = (line) => `<td class="${TOOLTIP_ROW_NAME_CLASS_NANE}">
17
+ const renderNameCell = (line) => `<td class="${TOOLTIP_ROW_NAME_CLASS_NAME}">
18
18
  ${line.hideSeriesName ? '' : escapeHTML(line.seriesName)}
19
19
  </td>`;
20
20
  const renderPercentCell = (line) => `<td class="_tooltip-rows__percent-td">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/chartkit",
3
- "version": "5.19.1",
3
+ "version": "5.19.2",
4
4
  "description": "React component used to render charts based on any sources you need",
5
5
  "license": "MIT",
6
6
  "repository": "git@github.com:gravity-ui/ChartKit.git",
@@ -50,7 +50,7 @@
50
50
  "@gravity-ui/charts": "^0.5.0",
51
51
  "@gravity-ui/date-utils": "^2.1.0",
52
52
  "@gravity-ui/i18n": "^1.0.0",
53
- "@gravity-ui/yagr": "^4.3.4",
53
+ "@gravity-ui/yagr": "^4.4.0",
54
54
  "afterframe": "^1.0.2",
55
55
  "lodash": "^4.17.21",
56
56
  "tslib": "^2.6.2"