From c51fd2a41410f779220d6eaf715da1b0434e4b38 Mon Sep 17 00:00:00 2001 From: Diego Medina Date: Fri, 22 Jul 2022 06:05:37 -0300 Subject: [PATCH] Temporal X Axis values are not properly displayed if the time column has a custom label defined (#20819) (cherry picked from commit 51869f32acd24af183f7c07bb515835bb10a7bc6) --- .../plugin-chart-echarts/src/Timeseries/transformProps.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts index 89d5c1e03b31d..ca0e079609df8 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts @@ -170,7 +170,8 @@ export default function transformProps( Object.values(rawSeries).map(series => series.name as string), ); const isAreaExpand = stack === AreaChartExtraControlsValue.Expand; - const xAxisDataType = dataTypes?.[xAxisCol]; + const xAxisDataType = dataTypes?.[xAxisCol] ?? dataTypes?.[xAxisOrig]; + const xAxisType = getAxisType(xAxisDataType); const series: SeriesOption[] = []; const formatter = getNumberFormatter(