mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
fix(plugin-chart-echarts): fix customize margin (#18958)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user