From 4b808b8be2555cc29575b8ce6193690ccda23abf Mon Sep 17 00:00:00 2001 From: Irina Kuzmina Date: Mon, 15 Apr 2024 18:29:52 +0300 Subject: [PATCH] fix(Highcharts plugin): Remove debounce to render the totals in a donut chart (#469) fix(Highcharts plugin): Remove debounce to render the totals in a donut chart --- src/plugins/highcharts/renderer/helpers/config/config.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/plugins/highcharts/renderer/helpers/config/config.js b/src/plugins/highcharts/renderer/helpers/config/config.js index a6b2fa3d..5b2b2cd4 100644 --- a/src/plugins/highcharts/renderer/helpers/config/config.js +++ b/src/plugins/highcharts/renderer/helpers/config/config.js @@ -3,7 +3,6 @@ import {dateTime} from '@gravity-ui/date-utils'; import Highcharts from 'highcharts'; import clamp from 'lodash/clamp'; -import debounce from 'lodash/debounce'; import get from 'lodash/get'; import isEmpty from 'lodash/isEmpty'; import isNumber from 'lodash/isNumber'; @@ -1523,7 +1522,6 @@ export function prepareConfig(data, options, isMobile, holidays) { const chartType = get(options, 'highcharts.chart.type') || 'line'; const {entryId} = options; const testClassName = `data-qa-chartkit-tooltip-entry-${entryId}`; - const debouncedAdjustDonutFontSize = debounce(adjustDonutFontSize, 100); const params = merge(getParamsByCustomType(options.type, options), defaultOptions, { _config: options, chart: { @@ -1627,12 +1625,7 @@ export function prepareConfig(data, options, isMobile, holidays) { const chartSeries = chart.series[0]; const innerWidth = chartSeries?.center[3]; if (innerWidth) { - debouncedAdjustDonutFontSize( - chart, - chartSeries, - innerWidth, - totals, - ); + adjustDonutFontSize(chart, chartSeries, innerWidth, totals); } }, }),