From d8b61d96ccc7eae25efdbb4c621a45283cebb9b8 Mon Sep 17 00:00:00 2001 From: "Mr.Dr.Professor Patrick" Date: Mon, 13 May 2024 14:22:28 +0200 Subject: [PATCH] fix(Highcharts plugin): return old value for pie.slicedOffset (#478) --- src/plugins/highcharts/renderer/helpers/config/config.js | 8 ++++++++ src/plugins/highcharts/renderer/helpers/config/options.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/plugins/highcharts/renderer/helpers/config/config.js b/src/plugins/highcharts/renderer/helpers/config/config.js index 3ffd11b3..7d454a15 100644 --- a/src/plugins/highcharts/renderer/helpers/config/config.js +++ b/src/plugins/highcharts/renderer/helpers/config/config.js @@ -1682,6 +1682,14 @@ export function prepareConfig(data, options, isMobile, holidays) { } }, }, + point: { + events: { + click: function () { + // Prevent slicing of pie segment after clicking it + return false; + }, + }, + }, marker: options.splitTooltip ? { states: { diff --git a/src/plugins/highcharts/renderer/helpers/config/options.js b/src/plugins/highcharts/renderer/helpers/config/options.js index 0d81c1db..ffa81714 100644 --- a/src/plugins/highcharts/renderer/helpers/config/options.js +++ b/src/plugins/highcharts/renderer/helpers/config/options.js @@ -78,7 +78,7 @@ const first = { const second = { allowPointSelect: true, - slicedOffset: 0, + slicedOffset: 20, cursor: 'pointer', showInLegend: true, };