From 541eed8ea8cc0bb111ad0bd5223921313256a44f Mon Sep 17 00:00:00 2001 From: Edoardo Sabadelli Date: Wed, 27 Sep 2023 12:15:43 +0200 Subject: [PATCH] fix: avoid crash in DV with some chart types DHIS2-15882 --- src/visualizations/config/adapters/dhis_highcharts/chart.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/visualizations/config/adapters/dhis_highcharts/chart.js b/src/visualizations/config/adapters/dhis_highcharts/chart.js index 9174ad816..e50a52ca9 100644 --- a/src/visualizations/config/adapters/dhis_highcharts/chart.js +++ b/src/visualizations/config/adapters/dhis_highcharts/chart.js @@ -22,7 +22,11 @@ const getEvents = () => ({ if (item.legendSymbol) { item.legendSymbol.attr({ translateY: - -((item.legendItem.getBBox().height * 0.75) / 4) + + -( + (item.legendItem.label.getBBox().height * + 0.75) / + 4 + ) + item.legendSymbol.r / 2, }) }