@gravity-ui/chartkit 5.10.1 → 5.10.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.
|
@@ -423,7 +423,10 @@ function getTooltip(tooltip, options, comments, holidays) {
|
|
|
423
423
|
unsafe: Boolean(options.unsafe),
|
|
424
424
|
};
|
|
425
425
|
if (typeof options.manageTooltipConfig === 'function') {
|
|
426
|
-
|
|
426
|
+
// manageTooltipConfig could accidently break json variable
|
|
427
|
+
// and because of it we create new object as an argument
|
|
428
|
+
const updatedJSON = callManageTooltipConfig(options, Object.assign({}, json), chart);
|
|
429
|
+
merge(json, updatedJSON);
|
|
427
430
|
}
|
|
428
431
|
const usersPointFormat = get(options.highcharts, 'tooltip.pointFormat');
|
|
429
432
|
if (tooltipOptions.pointFormatter || usersPointFormat) {
|
|
@@ -640,7 +643,10 @@ function getTooltip(tooltip, options, comments, holidays) {
|
|
|
640
643
|
delete json.pre_lines;
|
|
641
644
|
if (json.lines && json.lines.length > 0) {
|
|
642
645
|
if (typeof options.manageTooltipConfig === 'function') {
|
|
643
|
-
|
|
646
|
+
// manageTooltipConfig could accidently break json variable
|
|
647
|
+
// and because of it we create new object as an argument
|
|
648
|
+
const updatedJSON = callManageTooltipConfig(options, Object.assign({}, json), chart);
|
|
649
|
+
merge(json, updatedJSON);
|
|
644
650
|
}
|
|
645
651
|
let hiddenRowsSum = 0;
|
|
646
652
|
let maxChartKitPrecision = null;
|
package/package.json
CHANGED