From b613167636aae82170b24f697d79fcd70ef1ac56 Mon Sep 17 00:00:00 2001 From: akashboora Date: Sat, 8 Apr 2023 17:44:12 +0530 Subject: [PATCH] fix(Gauge echart): displaying column label (#23396) --- .../plugins/plugin-chart-echarts/src/Gauge/transformProps.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/transformProps.ts index b2e31c3cc1885..6ff97bf0c53cc 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/transformProps.ts @@ -100,10 +100,11 @@ export default function transformProps( filterState, theme, emitCrossFilters, + datasource, } = chartProps; const gaugeSeriesOptions = defaultGaugeSeriesOption(theme); - + const { verboseMap = {} } = datasource; const { groupby, metric, @@ -146,7 +147,7 @@ export default function transformProps( const transformedData: GaugeDataItemOption[] = data.map( (data_point, index) => { const name = groupbyLabels - .map(column => `${column}: ${data_point[column]}`) + .map(column => `${verboseMap[column] || column}: ${data_point[column]}`) .join(', '); columnsLabelMap.set( name,