mirror of
https://github.com/apache/superset.git
synced 2026-04-27 03:55:47 +00:00
fix(plugin-chart-echarts): reorder totals and support multimetric sort (#23675)
This commit is contained in:
@@ -126,6 +126,7 @@ export default function transformProps(
|
||||
logAxis,
|
||||
markerEnabled,
|
||||
markerSize,
|
||||
metrics,
|
||||
minorSplitLine,
|
||||
onlyTotal,
|
||||
opacity,
|
||||
@@ -193,7 +194,9 @@ export default function transformProps(
|
||||
getMetricLabel,
|
||||
);
|
||||
|
||||
const rawSeries = extractSeries(rebasedData, {
|
||||
const isMultiSeries = groupby.length || metrics.length > 1;
|
||||
|
||||
const [rawSeries, sortedTotalValues] = extractSeries(rebasedData, {
|
||||
fillNeighborValue: stack && !forecastEnabled ? 0 : undefined,
|
||||
xAxis: xAxisLabel,
|
||||
extraMetricLabels,
|
||||
@@ -202,8 +205,8 @@ export default function transformProps(
|
||||
isHorizontal,
|
||||
sortSeriesType,
|
||||
sortSeriesAscending,
|
||||
xAxisSortSeries: groupby.length ? xAxisSortSeries : undefined,
|
||||
xAxisSortSeriesAscending: groupby.length
|
||||
xAxisSortSeries: isMultiSeries ? xAxisSortSeries : undefined,
|
||||
xAxisSortSeriesAscending: isMultiSeries
|
||||
? xAxisSortSeriesAscending
|
||||
: undefined,
|
||||
});
|
||||
@@ -240,7 +243,7 @@ export default function transformProps(
|
||||
formatter,
|
||||
showValue,
|
||||
onlyTotal,
|
||||
totalStackedValues,
|
||||
totalStackedValues: sortedTotalValues,
|
||||
showValueIndexes,
|
||||
thresholdValues,
|
||||
richTooltip,
|
||||
|
||||
Reference in New Issue
Block a user