From a7898f191a1ad3a8ae91f8b48cf577892980c061 Mon Sep 17 00:00:00 2001 From: Daniel Cohen Gindi Date: Tue, 13 Oct 2015 20:56:34 +0300 Subject: [PATCH] Allow getting/settings minOffset of the charts, instead of zeroing them out totally --- .../charting/charts/BarLineChartBase.java | 10 ++++++++++ .../charting/charts/PieRadarChartBase.java | 17 +++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/MPChartLib/src/com/github/mikephil/charting/charts/BarLineChartBase.java b/MPChartLib/src/com/github/mikephil/charting/charts/BarLineChartBase.java index 713ed0fc62..3a89c2aada 100644 --- a/MPChartLib/src/com/github/mikephil/charting/charts/BarLineChartBase.java +++ b/MPChartLib/src/com/github/mikephil/charting/charts/BarLineChartBase.java @@ -1131,6 +1131,16 @@ public void setBorderColor(int color) { mBorderPaint.setColor(color); } + /** Gets the minimum offset (padding) around the chart, defaults to 10.f */ + public float getMinOffset() { + return mMinOffset; + } + + /** Sets the minimum offset (padding) around the chart, defaults to 10.f */ + public void setMinOffset(float minOffset) { + mMinOffset = minOffset; + } + /** * Returns the Highlight object (contains x-index and DataSet index) of the * selected value at the given touch point inside the Line-, Scatter-, or diff --git a/MPChartLib/src/com/github/mikephil/charting/charts/PieRadarChartBase.java b/MPChartLib/src/com/github/mikephil/charting/charts/PieRadarChartBase.java index c5ff63c7e8..881ea65f91 100644 --- a/MPChartLib/src/com/github/mikephil/charting/charts/PieRadarChartBase.java +++ b/MPChartLib/src/com/github/mikephil/charting/charts/PieRadarChartBase.java @@ -42,6 +42,9 @@ public abstract class PieRadarChartBase