mirror of
https://github.com/apache/superset.git
synced 2026-05-07 08:54:23 +00:00
fix(echarts): Display NULL values in categorical x-axis for bar charts (#34761)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -233,6 +233,8 @@ export default function transformProps(
|
||||
);
|
||||
|
||||
const isMultiSeries = groupBy.length || metrics?.length > 1;
|
||||
const xAxisDataType = dataTypes?.[xAxisLabel] ?? dataTypes?.[xAxisOrig];
|
||||
const xAxisType = getAxisType(stack, xAxisForceCategorical, xAxisDataType);
|
||||
|
||||
const [rawSeries, sortedTotalValues, minPositiveValue] = extractSeries(
|
||||
rebasedData,
|
||||
@@ -247,6 +249,7 @@ export default function transformProps(
|
||||
sortSeriesAscending,
|
||||
xAxisSortSeries: isMultiSeries ? xAxisSort : undefined,
|
||||
xAxisSortSeriesAscending: isMultiSeries ? xAxisSortAsc : undefined,
|
||||
xAxisType,
|
||||
},
|
||||
);
|
||||
const showValueIndexes = extractShowValueIndexes(rawSeries, {
|
||||
@@ -259,9 +262,6 @@ export default function transformProps(
|
||||
rawSeries.map(series => series.name as string),
|
||||
);
|
||||
const isAreaExpand = stack === StackControlsValue.Expand;
|
||||
const xAxisDataType = dataTypes?.[xAxisLabel] ?? dataTypes?.[xAxisOrig];
|
||||
|
||||
const xAxisType = getAxisType(stack, xAxisForceCategorical, xAxisDataType);
|
||||
const series: SeriesOption[] = [];
|
||||
|
||||
const forcePercentFormatter = Boolean(contributionMode || isAreaExpand);
|
||||
|
||||
Reference in New Issue
Block a user