You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2023/04/08 12:14:36 UTC

[superset] branch master updated: fix(Gauge echart): displaying column label (#23396)

This is an automated email from the ASF dual-hosted git repository.

villebro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new b613167636 fix(Gauge echart): displaying column label (#23396)
b613167636 is described below

commit b613167636aae82170b24f697d79fcd70ef1ac56
Author: akashboora <ak...@zemosolabs.com>
AuthorDate: Sat Apr 8 17:44:12 2023 +0530

    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 b2e31c3cc1..6ff97bf0c5 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,