mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
fix(table): Double percenting ad-hoc percentage metrics (#25857)
This commit is contained in:
@@ -118,9 +118,10 @@ const processColumns = memoizeOne(function processColumns(
|
||||
// because users can also add things like `MAX(str_col)` as a metric.
|
||||
const isMetric = metricsSet.has(key) && isNumeric(key, records);
|
||||
const isPercentMetric = percentMetricsSet.has(key);
|
||||
const label = isPercentMetric
|
||||
? `%${verboseMap?.[key.replace('%', '')] || key}`
|
||||
: verboseMap?.[key] || key;
|
||||
const label =
|
||||
isPercentMetric && verboseMap?.hasOwnProperty(key.replace('%', ''))
|
||||
? `%${verboseMap[key.replace('%', '')]}`
|
||||
: verboseMap?.[key] || key;
|
||||
const isTime = dataType === GenericDataType.TEMPORAL;
|
||||
const isNumber = dataType === GenericDataType.NUMERIC;
|
||||
const savedFormat = columnFormats?.[key];
|
||||
|
||||
Reference in New Issue
Block a user