mirror of
https://github.com/apache/superset.git
synced 2026-04-23 01:55:09 +00:00
fix: remove sort values on stacked totals (#31333)
This commit is contained in:
committed by
GitHub
parent
5867b87680
commit
15fbb195e9
@@ -27,6 +27,7 @@ import {
|
||||
ensureIsArray,
|
||||
GenericDataType,
|
||||
getCustomFormatter,
|
||||
getMetricLabel,
|
||||
getNumberFormatter,
|
||||
getXAxisLabel,
|
||||
isDefined,
|
||||
@@ -291,12 +292,20 @@ export default function transformProps(
|
||||
const showValueIndexesB = extractShowValueIndexes(rawSeriesB, {
|
||||
stack,
|
||||
});
|
||||
|
||||
const metricsLabels = metrics
|
||||
.map(metric => getMetricLabel(metric, undefined, undefined, verboseMap))
|
||||
.filter((label): label is string => label !== undefined);
|
||||
const metricsLabelsB = metricsB.map((metric: QueryFormMetric) =>
|
||||
getMetricLabel(metric, undefined, undefined, verboseMap),
|
||||
);
|
||||
|
||||
const { totalStackedValues, thresholdValues } = extractDataTotalValues(
|
||||
rebasedDataA,
|
||||
{
|
||||
stack,
|
||||
percentageThreshold,
|
||||
xAxisCol: xAxisLabel,
|
||||
metricsLabels,
|
||||
},
|
||||
);
|
||||
const {
|
||||
@@ -305,7 +314,7 @@ export default function transformProps(
|
||||
} = extractDataTotalValues(rebasedDataB, {
|
||||
stack: Boolean(stackB),
|
||||
percentageThreshold,
|
||||
xAxisCol: xAxisLabel,
|
||||
metricsLabels: metricsLabelsB,
|
||||
});
|
||||
|
||||
annotationLayers
|
||||
|
||||
Reference in New Issue
Block a user