Move getXAxis() method
diff --git a/MPChartLib/src/com/github/mikephil/charting/charts/BarLineChartBase.java b/MPChartLib/src/com/github/mikephil/charting/charts/BarLineChartBase.java
index f14709a..569d3b1 100644
--- a/MPChartLib/src/com/github/mikephil/charting/charts/BarLineChartBase.java
+++ b/MPChartLib/src/com/github/mikephil/charting/charts/BarLineChartBase.java
@@ -1379,17 +1379,6 @@
}
/**
- * Returns the object representing all x-labels, this method can be used to
- * acquire the XAxis object and modify it (e.g. change the position of the
- * labels)
- *
- * @return
- */
- public XAxis getXAxis() {
- return mXAxis;
- }
-
- /**
* If set to true, both x and y axis can be scaled simultaneously with 2 fingers, if false,
* x and y axis can be scaled separately. default: false
*
diff --git a/MPChartLib/src/com/github/mikephil/charting/charts/Chart.java b/MPChartLib/src/com/github/mikephil/charting/charts/Chart.java
index 3fa81c0..055bdf7 100644
--- a/MPChartLib/src/com/github/mikephil/charting/charts/Chart.java
+++ b/MPChartLib/src/com/github/mikephil/charting/charts/Chart.java
@@ -924,6 +924,18 @@
*/
/** BELOW THIS ONLY GETTERS AND SETTERS */
+
+ /**
+ * Returns the object representing all x-labels, this method can be used to
+ * acquire the XAxis object and modify it (e.g. change the position of the
+ * labels, styling, etc.)
+ *
+ * @return
+ */
+ public XAxis getXAxis() {
+ return mXAxis;
+ }
+
/**
* Returns the default ValueFormatter that has been determined by the chart
* considering the provided minimum and maximum values.
diff --git a/MPChartLib/src/com/github/mikephil/charting/charts/PieChart.java b/MPChartLib/src/com/github/mikephil/charting/charts/PieChart.java
index 8219a45..1bee5a1 100644
--- a/MPChartLib/src/com/github/mikephil/charting/charts/PieChart.java
+++ b/MPChartLib/src/com/github/mikephil/charting/charts/PieChart.java
@@ -9,6 +9,7 @@
import android.graphics.Typeface;
import android.util.AttributeSet;
+import com.github.mikephil.charting.components.XAxis;
import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.data.PieData;
import com.github.mikephil.charting.highlight.Highlight;
@@ -109,6 +110,7 @@
super.init();
mRenderer = new PieChartRenderer(this, mAnimator, mViewPortHandler);
+ mXAxis = null;
}
@Override
@@ -275,6 +277,17 @@
return value / yValueSum * mMaxAngle;
}
+ /**
+ * This will throw an exception, PieChart has no XAxis object.
+ *
+ * @return
+ */
+ @Deprecated
+ @Override
+ public XAxis getXAxis() {
+ throw new RuntimeException("PieChart has no XAxis");
+ }
+
@Override
public int getIndexForAngle(float angle) {
@@ -536,7 +549,8 @@
}
/**
- * Sets the amount of transparency the transparent circle should have 0 = fully transparent, 255 = fully opaque.
+ * Sets the amount of transparency the transparent circle should have 0 = fully transparent,
+ * 255 = fully opaque.
* Default value is 100.
*
* @param alpha 0-255
@@ -594,7 +608,8 @@
}
/**
- * the rectangular radius of the bounding box for the center text, as a percentage of the pie hole
+ * the rectangular radius of the bounding box for the center text, as a percentage of the pie
+ * hole
* default 1.f (100%)
*/
public void setCenterTextRadiusPercent(float percent) {
@@ -602,7 +617,8 @@
}
/**
- * the rectangular radius of the bounding box for the center text, as a percentage of the pie hole
+ * the rectangular radius of the bounding box for the center text, as a percentage of the pie
+ * hole
* default 1.f (100%)
*/
public float getCenterTextRadiusPercent() {
diff --git a/MPChartLib/src/com/github/mikephil/charting/charts/RadarChart.java b/MPChartLib/src/com/github/mikephil/charting/charts/RadarChart.java
index 3601dda..8f6c1cb 100644
--- a/MPChartLib/src/com/github/mikephil/charting/charts/RadarChart.java
+++ b/MPChartLib/src/com/github/mikephil/charting/charts/RadarChart.java
@@ -219,16 +219,6 @@
}
/**
- * Returns the object that represents all x-labels that are placed around
- * the RadarChart.
- *
- * @return
- */
- public XAxis getXAxis() {
- return mXAxis;
- }
-
- /**
* Sets the width of the web lines that come from the center.
*
* @param width