diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts index 19fe600ca31c9..c357b2a40ee9d 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts @@ -456,18 +456,18 @@ export function getPadding( const yAxisOffset = addYAxisTitleOffset ? TIMESERIES_CONSTANTS.yAxisLabelTopOffset : 0; - const xAxisOffset = addXAxisTitleOffset ? xAxisTitleMargin || 0 : 0; + const xAxisOffset = addXAxisTitleOffset ? Number(xAxisTitleMargin) || 0 : 0; return getChartPadding(showLegend, legendOrientation, margin, { top: yAxisTitlePosition && yAxisTitlePosition === 'Top' - ? TIMESERIES_CONSTANTS.gridOffsetTop + (yAxisTitleMargin || 0) + ? TIMESERIES_CONSTANTS.gridOffsetTop + (Number(yAxisTitleMargin) || 0) : TIMESERIES_CONSTANTS.gridOffsetTop + yAxisOffset, bottom: zoomable ? TIMESERIES_CONSTANTS.gridOffsetBottomZoomable + xAxisOffset : TIMESERIES_CONSTANTS.gridOffsetBottom + xAxisOffset, left: yAxisTitlePosition === 'Left' - ? TIMESERIES_CONSTANTS.gridOffsetLeft + (yAxisTitleMargin || 0) + ? TIMESERIES_CONSTANTS.gridOffsetLeft + (Number(yAxisTitleMargin) || 0) : TIMESERIES_CONSTANTS.gridOffsetLeft, right: showLegend && legendOrientation === LegendOrientation.Right