mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
fix(chart): use categorical axis for bar charts with numeric x-axis (#39141)
Co-authored-by: Enzo Martellucci <52219496+EnxDev@users.noreply.github.com>
(cherry picked from commit 171414f165)
This commit is contained in:
committed by
Michael S. Molina
parent
3159ec0356
commit
2f6254bfb4
@@ -1400,6 +1400,25 @@ test('getAxisType with forced categorical', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('getAxisType treats numeric as category for bar charts', () => {
|
||||
expect(
|
||||
getAxisType(
|
||||
false,
|
||||
false,
|
||||
GenericDataType.Numeric,
|
||||
EchartsTimeseriesSeriesType.Bar,
|
||||
),
|
||||
).toEqual(AxisType.Category);
|
||||
expect(
|
||||
getAxisType(
|
||||
false,
|
||||
false,
|
||||
GenericDataType.Numeric,
|
||||
EchartsTimeseriesSeriesType.Line,
|
||||
),
|
||||
).toEqual(AxisType.Value);
|
||||
});
|
||||
|
||||
test('getMinAndMaxFromBounds returns empty object when not truncating', () => {
|
||||
expect(
|
||||
getMinAndMaxFromBounds(
|
||||
|
||||
Reference in New Issue
Block a user