Skip to content

Commit

Permalink
Fixed double calculation of xAxis spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi authored Nov 8, 2016
1 parent 00f3605 commit 3928e28
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -397,18 +397,12 @@ protected void calculateLegendOffsets(RectF offsets) {
offsets.top += Math.min(mLegend.mNeededHeight,
mViewPortHandler.getChartHeight() * mLegend.getMaxSizePercent())
+ mLegend.getYOffset();

if (getXAxis().isEnabled() && getXAxis().isDrawLabelsEnabled())
offsets.top += getXAxis().mLabelRotatedHeight;
break;

case BOTTOM:
offsets.bottom += Math.min(mLegend.mNeededHeight,
mViewPortHandler.getChartHeight() * mLegend.getMaxSizePercent())
+ mLegend.getYOffset();

if (getXAxis().isEnabled() && getXAxis().isDrawLabelsEnabled())
offsets.bottom += getXAxis().mLabelRotatedHeight;
break;

default:
Expand Down

1 comment on commit 3928e28

@kzmi
Copy link

@kzmi kzmi commented on 3928e28 Apr 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double calculation is still there in the "orientation == HORIZONTAL" case.
(v3.0.2)

Please sign in to comment.