fix: revert "fix: remove sort values on stacked totals (#31333)" (#32337)

This commit is contained in:
Elizabeth Thompson
2025-02-21 10:35:06 -08:00
committed by GitHub
parent f820f9a976
commit 422a07b382
6 changed files with 27 additions and 175 deletions

View File

@@ -27,7 +27,6 @@ import {
ensureIsArray,
GenericDataType,
getCustomFormatter,
getMetricLabel,
getNumberFormatter,
getXAxisLabel,
isDefined,
@@ -292,20 +291,12 @@ 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,
metricsLabels,
xAxisCol: xAxisLabel,
},
);
const {
@@ -314,7 +305,7 @@ export default function transformProps(
} = extractDataTotalValues(rebasedDataB, {
stack: Boolean(stackB),
percentageThreshold,
metricsLabels: metricsLabelsB,
xAxisCol: xAxisLabel,
});
annotationLayers