fix(sunburst): Use metric label from verbose map (#31480)

This commit is contained in:
Michael Gerber 2024-12-16 18:44:33 +01:00 committed by GitHub
parent 9b28a6eed6
commit a1adb7f31c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 3 deletions

View File

@ -188,7 +188,11 @@ export default function transformProps(
showTotal,
sliceId,
} = formData;
const { currencyFormats = {}, columnFormats = {} } = datasource;
const {
currencyFormats = {},
columnFormats = {},
verboseMap = {},
} = datasource;
const refs: Refs = {};
const primaryValueFormatter = getValueFormatter(
metric,
@ -334,8 +338,10 @@ export default function transformProps(
secondaryValueFormatter,
colorByCategory,
totalValue,
metricLabel,
secondaryMetricLabel,
metricLabel: verboseMap[metricLabel] || metricLabel,
secondaryMetricLabel: secondaryMetricLabel
? verboseMap[secondaryMetricLabel] || secondaryMetricLabel
: undefined,
}),
},
series: [