From c3c9ee89d3fb00b7cccb376ded9a09c1ce41948a Mon Sep 17 00:00:00 2001 From: Katrin Yordanova Date: Wed, 23 Nov 2022 17:03:11 +0200 Subject: [PATCH] Fix default legend repositiong in pie and doughnut charts --- lib/js/src/compose/types/chart/chart.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/js/src/compose/types/chart/chart.ts b/lib/js/src/compose/types/chart/chart.ts index 811d4ebb8..03bf75cbb 100644 --- a/lib/js/src/compose/types/chart/chart.ts +++ b/lib/js/src/compose/types/chart/chart.ts @@ -190,11 +190,13 @@ export default class Chart extends BaseChart { ? t.formatting : `{a}
{b} : {c}${relative ? ' ({d}%)' : ''}` - pieLegend = { - top: l?.position?.top || 'auto', - right: l?.position?.right || 'auto', - bottom: l?.position?.bottom || 'auto', - left: l?.position?.left || 'auto', + if (l?.isCustomized) { + pieLegend = { + top: l?.position?.top || 'auto', + right: l?.position?.right || 'auto', + bottom: l?.position?.bottom || 'auto', + left: l?.position?.left || 'auto', + } } return {