@gravity-ui/chartkit 7.59.1 → 7.60.1

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.
@@ -1381,7 +1381,8 @@ export function prepareConfig(data, options, isMobile, holidays) {
1381
1381
  params.tooltip.formatter = function (tooltip) {
1382
1382
  return `<div class="${b()}">${formatter.call(this, tooltip)}</div>`;
1383
1383
  };
1384
- delete options.highcharts.tooltip.formatter;
1384
+ // The raw formatter is stripped from the merge source (preparedHighchartsOptions) below,
1385
+ // not from options.highcharts, so the caller's libraryConfig is not mutated.
1385
1386
  }
1386
1387
  else {
1387
1388
  params.tooltip.formatter = function (tooltip) {
@@ -1450,6 +1451,11 @@ export function prepareConfig(data, options, isMobile, holidays) {
1450
1451
  line: seriesDataLabelsFormatter,
1451
1452
  },
1452
1453
  }, options.highcharts);
1454
+ // params.tooltip.formatter already holds the wrapped user formatter (see above).
1455
+ // Drop the raw formatter from this clone so the merge below doesn't override the wrapper.
1456
+ if (preparedHighchartsOptions.tooltip) {
1457
+ delete preparedHighchartsOptions.tooltip.formatter;
1458
+ }
1453
1459
  mergeWith(params, getTypeParams(data, options), preparedHighchartsOptions, (a, b) => {
1454
1460
  if (typeof a === 'function' && typeof b === 'function' && a !== b) {
1455
1461
  return function (event, ...args) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/chartkit",
3
- "version": "7.59.1",
3
+ "version": "7.60.1",
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",
@@ -47,7 +47,7 @@
47
47
  ],
48
48
  "dependencies": {
49
49
  "@bem-react/classname": "^1.6.0",
50
- "@gravity-ui/charts": "^1.55.2",
50
+ "@gravity-ui/charts": "^1.56.0",
51
51
  "@gravity-ui/date-utils": "^2.1.0",
52
52
  "@gravity-ui/i18n": "^1.0.0",
53
53
  "@gravity-ui/yagr": "^4.13.4",