mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix(plugin-chart-echarts): support numerical x-axis (#26087)
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
import { SortSeriesType } from '@superset-ui/chart-controls';
|
||||
import {
|
||||
AxisType,
|
||||
DataRecord,
|
||||
GenericDataType,
|
||||
getNumberFormatter,
|
||||
@@ -31,6 +32,7 @@ import {
|
||||
extractSeries,
|
||||
extractShowValueIndexes,
|
||||
formatSeriesName,
|
||||
getAxisType,
|
||||
getChartPadding,
|
||||
getLegendProps,
|
||||
getOverMaxHiddenFormatter,
|
||||
@@ -870,3 +872,10 @@ test('calculateLowerLogTick', () => {
|
||||
expect(calculateLowerLogTick(2)).toEqual(1);
|
||||
expect(calculateLowerLogTick(0.005)).toEqual(0.001);
|
||||
});
|
||||
|
||||
test('getAxisType', () => {
|
||||
expect(getAxisType(GenericDataType.TEMPORAL)).toEqual(AxisType.time);
|
||||
expect(getAxisType(GenericDataType.NUMERIC)).toEqual(AxisType.value);
|
||||
expect(getAxisType(GenericDataType.BOOLEAN)).toEqual(AxisType.category);
|
||||
expect(getAxisType(GenericDataType.STRING)).toEqual(AxisType.category);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user