fix(revert 27883): Excess padding in horizontal Bar charts (#29345)

This commit is contained in:
Michael S. Molina
2024-06-25 13:33:53 -03:00
committed by GitHub
parent 213fd69b2b
commit 708afb7146
3 changed files with 2 additions and 12 deletions

View File

@@ -518,7 +518,6 @@ export default function transformProps(
if (isHorizontal) {
[xAxis, yAxis] = [yAxis, xAxis];
[padding.bottom, padding.left] = [padding.left, padding.bottom];
yAxis.inverse = true;
}
const echartOptions: EChartsCoreOption = {

View File

@@ -571,10 +571,6 @@ export function getPadding(
? TIMESERIES_CONSTANTS.yAxisLabelTopOffset
: 0;
const xAxisOffset = addXAxisTitleOffset ? Number(xAxisTitleMargin) || 0 : 0;
const showLegendTopOffset =
isHorizontal && showLegend && legendOrientation === LegendOrientation.Top
? 100
: 0;
return getChartPadding(
showLegend,
@@ -583,12 +579,8 @@ export function getPadding(
{
top:
yAxisTitlePosition && yAxisTitlePosition === 'Top'
? TIMESERIES_CONSTANTS.gridOffsetTop +
showLegendTopOffset +
(Number(yAxisTitleMargin) || 0)
: TIMESERIES_CONSTANTS.gridOffsetTop +
showLegendTopOffset +
yAxisOffset,
? TIMESERIES_CONSTANTS.gridOffsetTop + (Number(yAxisTitleMargin) || 0)
: TIMESERIES_CONSTANTS.gridOffsetTop + yAxisOffset,
bottom:
zoomable && !isHorizontal
? TIMESERIES_CONSTANTS.gridOffsetBottomZoomable + xAxisOffset