@gravity-ui/chartkit 7.60.0 → 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
|
-
|
|
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