fix(plugin-chart-echarts): support numerical x-axis (#26087)

This commit is contained in:
Ville Brofeldt
2023-11-24 07:36:32 -08:00
committed by GitHub
parent 57d61df44d
commit aad67e43db
3 changed files with 23 additions and 10 deletions

View File

@@ -25,12 +25,12 @@ import {
DTTM_ALIAS,
ensureIsArray,
GenericDataType,
LegendState,
normalizeTimestamp,
NumberFormats,
NumberFormatter,
TimeFormatter,
SupersetTheme,
normalizeTimestamp,
LegendState,
TimeFormatter,
ValueFormatter,
} from '@superset-ui/core';
import { SortSeriesType } from '@superset-ui/chart-controls';
@@ -512,6 +512,9 @@ export function getAxisType(dataType?: GenericDataType): AxisType {
if (dataType === GenericDataType.TEMPORAL) {
return AxisType.time;
}
if (dataType === GenericDataType.NUMERIC) {
return AxisType.value;
}
return AxisType.category;
}