Skip to content

Commit 1cecb82

Browse files
committed
Merge
2 parents 528dd49 + 0ee538c commit 1cecb82

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

MPChartLib/src/com/github/mikephil/charting/components/AxisBase.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,14 @@ public DashPathEffect getGridDashPathEffect() {
320320
* ###### BELOW CODE RELATED TO CUSTOM AXIS VALUES ######
321321
*/
322322

323+
public float getAxisMaximum() {
324+
return mAxisMaximum;
325+
}
326+
327+
public float getAxisMinimum() {
328+
return mAxisMinimum;
329+
}
330+
323331
/**
324332
* By calling this method, any custom maximum value that has been previously set is reseted,
325333
* and the calculation is

MPChartLib/src/com/github/mikephil/charting/renderer/LegendRenderer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public void renderLegend(Canvas c) {
232232
if (direction == Legend.LegendDirection.LEFT_TO_RIGHT)
233233
originPosX -= mLegend.mNeededWidth;
234234
} else // BELOW_CHART_CENTER || ABOVE_CHART_CENTER
235-
originPosX = mViewPortHandler.contentLeft() + contentWidth / 2.f;
235+
originPosX = mViewPortHandler.contentLeft() + contentWidth / 2.f - mLegend.mNeededWidth / 2f;
236236

237237
FSize[] calculatedLineSizes = mLegend.getCalculatedLineSizes();
238238
FSize[] calculatedLabelSizes = mLegend.getCalculatedLabelSizes();

0 commit comments

Comments
 (0)