mirror of
https://github.com/apache/superset.git
synced 2026-04-18 07:35:09 +00:00
fix: remove sort values on stacked totals (#31333)
This commit is contained in:
committed by
GitHub
parent
5867b87680
commit
15fbb195e9
@@ -60,8 +60,8 @@ export function extractDataTotalValues(
|
||||
opts: {
|
||||
stack: StackType;
|
||||
percentageThreshold: number;
|
||||
xAxisCol: string;
|
||||
legendState?: LegendState;
|
||||
metricsLabels: string[];
|
||||
},
|
||||
): {
|
||||
totalStackedValues: number[];
|
||||
@@ -69,11 +69,11 @@ export function extractDataTotalValues(
|
||||
} {
|
||||
const totalStackedValues: number[] = [];
|
||||
const thresholdValues: number[] = [];
|
||||
const { stack, percentageThreshold, xAxisCol, legendState } = opts;
|
||||
const { stack, percentageThreshold, legendState, metricsLabels } = opts;
|
||||
if (stack) {
|
||||
data.forEach(datum => {
|
||||
const values = Object.keys(datum).reduce((prev, curr) => {
|
||||
if (curr === xAxisCol) {
|
||||
if (!metricsLabels.includes(curr)) {
|
||||
return prev;
|
||||
}
|
||||
if (legendState && !legendState[curr]) {
|
||||
|
||||
Reference in New Issue
Block a user