aboutsummaryrefslogtreecommitdiff
path: root/MPChartLib/src
diff options
context:
space:
mode:
authoralmic <mick.ashton@flare-esports.net>2018-11-07 14:52:25 -0700
committeralmic <mick.ashton@flare-esports.net>2018-11-07 14:52:25 -0700
commitfc0e2342984758849384199f0225e0c6b5555168 (patch)
treef466e4843297dfc54c6b85aa491c646a51a250eb /MPChartLib/src
parente5b66192e7b303d7d25fc172b1878c055b554047 (diff)
downloadMPAndroidChart-fc0e2342984758849384199f0225e0c6b5555168.tar.gz
Remove Deprecated Things
Long deprecated Legend constructor and positioning has been removed, it was replaced with a new way to position the Legend. The old Easing options have been removed now, accessing them is as easy as removing the `EasingOption` part, such that the names look like `Easing.Linear` or `Easing.EaseInOutQuad` now.
Diffstat (limited to 'MPChartLib/src')
-rw-r--r--MPChartLib/src/main/java/com/github/mikephil/charting/animation/ChartAnimator.java93
-rw-r--r--MPChartLib/src/main/java/com/github/mikephil/charting/animation/Easing.java107
-rw-r--r--MPChartLib/src/main/java/com/github/mikephil/charting/charts/Chart.java54
-rw-r--r--MPChartLib/src/main/java/com/github/mikephil/charting/components/Legend.java110
4 files changed, 0 insertions, 364 deletions
diff --git a/MPChartLib/src/main/java/com/github/mikephil/charting/animation/ChartAnimator.java b/MPChartLib/src/main/java/com/github/mikephil/charting/animation/ChartAnimator.java
index b33b3fb6..e5b82db0 100644
--- a/MPChartLib/src/main/java/com/github/mikephil/charting/animation/ChartAnimator.java
+++ b/MPChartLib/src/main/java/com/github/mikephil/charting/animation/ChartAnimator.java
@@ -1,4 +1,3 @@
-
package com.github.mikephil.charting.animation;
import android.animation.ObjectAnimator;
@@ -161,98 +160,6 @@ public class ChartAnimator {
}
/**
- * Animates the drawing / rendering of the chart on both x- and y-axis with
- * the specified animation time. If animate(...) is called, no further
- * calling of invalidate() is necessary to refresh the chart.
- *
- * @param durationMillisX animation duration along the X axis
- * @param durationMillisY animation duration along the Y axis
- * @param easingX EasingFunction for the X axis
- * @param easingY EasingFunction for the Y axis
- *
- * @deprecated Use {@link #animateXY(int, int, EasingFunction, EasingFunction)}
- * @see #animateXY(int, int, EasingFunction, EasingFunction)
- */
- @SuppressWarnings("deprecation")
- @Deprecated
- public void animateXY(int durationMillisX, int durationMillisY, Easing.EasingOption easingX,
- Easing.EasingOption easingY) {
-
- if (android.os.Build.VERSION.SDK_INT < 11)
- return;
-
- ObjectAnimator animatorY = ObjectAnimator.ofFloat(this, "phaseY", 0f, 1f);
- animatorY.setInterpolator(Easing.getEasingFunctionFromOption(easingY));
- animatorY.setDuration(
- durationMillisY);
- ObjectAnimator animatorX = ObjectAnimator.ofFloat(this, "phaseX", 0f, 1f);
- animatorX.setInterpolator(Easing.getEasingFunctionFromOption(easingX));
- animatorX.setDuration(
- durationMillisX);
-
- // make sure only one animator produces update-callbacks (which then
- // call invalidate())
- if (durationMillisX > durationMillisY) {
- animatorX.addUpdateListener(mListener);
- } else {
- animatorY.addUpdateListener(mListener);
- }
-
- animatorX.start();
- animatorY.start();
- }
-
- /**
- * Animates the rendering of the chart on the x-axis with the specified
- * animation time. If animate(...) is called, no further calling of
- * invalidate() is necessary to refresh the chart.
- *
- * @param durationMillis animation duration
- * @param easing EasingFunction
- *
- * @deprecated Use {@link #animateX(int, EasingFunction)}
- * @see #animateX(int, EasingFunction)
- */
- @SuppressWarnings("deprecation")
- @Deprecated
- public void animateX(int durationMillis, Easing.EasingOption easing) {
-
- if (android.os.Build.VERSION.SDK_INT < 11)
- return;
-
- ObjectAnimator animatorX = ObjectAnimator.ofFloat(this, "phaseX", 0f, 1f);
- animatorX.setInterpolator(Easing.getEasingFunctionFromOption(easing));
- animatorX.setDuration(durationMillis);
- animatorX.addUpdateListener(mListener);
- animatorX.start();
- }
-
- /**
- * Animates the rendering of the chart on the y-axis with the specified
- * animation time. If animate(...) is called, no further calling of
- * invalidate() is necessary to refresh the chart.
- *
- * @param durationMillis animation duration
- * @param easing EasingFunction
- *
- * @deprecated Use {@link #animateY(int, EasingFunction)}
- * @see #animateY(int, EasingFunction)
- */
- @SuppressWarnings("deprecation")
- @Deprecated
- public void animateY(int durationMillis, Easing.EasingOption easing) {
-
- if (android.os.Build.VERSION.SDK_INT < 11)
- return;
-
- ObjectAnimator animatorY = ObjectAnimator.ofFloat(this, "phaseY", 0f, 1f);
- animatorY.setInterpolator(Easing.getEasingFunctionFromOption(easing));
- animatorY.setDuration(durationMillis);
- animatorY.addUpdateListener(mListener);
- animatorY.start();
- }
-
- /**
* Gets the Y axis phase of the animation.
*
* @return float value of {@link #mPhaseY}
diff --git a/MPChartLib/src/main/java/com/github/mikephil/charting/animation/Easing.java b/MPChartLib/src/main/java/com/github/mikephil/charting/animation/Easing.java
index 2c64777a..acb7dcc9 100644
--- a/MPChartLib/src/main/java/com/github/mikephil/charting/animation/Easing.java
+++ b/MPChartLib/src/main/java/com/github/mikephil/charting/animation/Easing.java
@@ -1,4 +1,3 @@
-
package com.github.mikephil.charting.animation;
import android.animation.TimeInterpolator;
@@ -19,112 +18,6 @@ public class Easing {
float getInterpolation(float input);
}
- /**
- * Enum holding EasingOption constants
- *
- * @deprecated Use Easing.Linear instead of Easing.EasingOption.Linear
- */
- @Deprecated
- public enum EasingOption {
- Linear,
- EaseInQuad,
- EaseOutQuad,
- EaseInOutQuad,
- EaseInCubic,
- EaseOutCubic,
- EaseInOutCubic,
- EaseInQuart,
- EaseOutQuart,
- EaseInOutQuart,
- EaseInSine,
- EaseOutSine,
- EaseInOutSine,
- EaseInExpo,
- EaseOutExpo,
- EaseInOutExpo,
- EaseInCirc,
- EaseOutCirc,
- EaseInOutCirc,
- EaseInElastic,
- EaseOutElastic,
- EaseInOutElastic,
- EaseInBack,
- EaseOutBack,
- EaseInOutBack,
- EaseInBounce,
- EaseOutBounce,
- EaseInOutBounce,
- }
-
- /**
- * Returns the EasingFunction of the given EasingOption
- *
- * @param easing EasingOption to get
- * @return EasingFunction
- */
- @Deprecated
- public static EasingFunction getEasingFunctionFromOption(EasingOption easing) {
- switch (easing) {
- default:
- case Linear:
- return Easing.Linear;
- case EaseInQuad:
- return Easing.EaseInQuad;
- case EaseOutQuad:
- return Easing.EaseOutQuad;
- case EaseInOutQuad:
- return Easing.EaseInOutQuad;
- case EaseInCubic:
- return Easing.EaseInCubic;
- case EaseOutCubic:
- return Easing.EaseOutCubic;
- case EaseInOutCubic:
- return Easing.EaseInOutCubic;
- case EaseInQuart:
- return Easing.EaseInQuart;
- case EaseOutQuart:
- return Easing.EaseOutQuart;
- case EaseInOutQuart:
- return Easing.EaseInOutQuart;
- case EaseInSine:
- return Easing.EaseInSine;
- case EaseOutSine:
- return Easing.EaseOutSine;
- case EaseInOutSine:
- return Easing.EaseInOutSine;
- case EaseInExpo:
- return Easing.EaseInExpo;
- case EaseOutExpo:
- return Easing.EaseOutExpo;
- case EaseInOutExpo:
- return Easing.EaseInOutExpo;
- case EaseInCirc:
- return Easing.EaseInCirc;
- case EaseOutCirc:
- return Easing.EaseOutCirc;
- case EaseInOutCirc:
- return Easing.EaseInOutCirc;
- case EaseInElastic:
- return Easing.EaseInElastic;
- case EaseOutElastic:
- return Easing.EaseOutElastic;
- case EaseInOutElastic:
- return Easing.EaseInOutElastic;
- case EaseInBack:
- return Easing.EaseInBack;
- case EaseOutBack:
- return Easing.EaseOutBack;
- case EaseInOutBack:
- return Easing.EaseInOutBack;
- case EaseInBounce:
- return Easing.EaseInBounce;
- case EaseOutBounce:
- return Easing.EaseOutBounce;
- case EaseInOutBounce:
- return Easing.EaseInOutBounce;
- }
- }
-
private static final float DOUBLE_PI = 2f * (float) Math.PI;
@SuppressWarnings("unused")
diff --git a/MPChartLib/src/main/java/com/github/mikephil/charting/charts/Chart.java b/MPChartLib/src/main/java/com/github/mikephil/charting/charts/Chart.java
index 5c82f9ab..0a1869e5 100644
--- a/MPChartLib/src/main/java/com/github/mikephil/charting/charts/Chart.java
+++ b/MPChartLib/src/main/java/com/github/mikephil/charting/charts/Chart.java
@@ -892,60 +892,6 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
/** CODE BELOW FOR PREDEFINED EASING OPTIONS */
/**
- * Animates the drawing / rendering of the chart on both x- and y-axis with
- * the specified animation time. If animate(...) is called, no further
- * calling of invalidate() is necessary to refresh the chart. ANIMATIONS
- * ONLY WORK FOR API LEVEL 11 (Android 3.0.x) AND HIGHER.
- *
- * @param durationMillisX
- * @param durationMillisY
- * @param easingX a predefined easing option
- * @param easingY a predefined easing option
- *
- * @deprecated Use {@link #animateXY(int, int, EasingFunction, EasingFunction)}
- * @see #animateXY(int, int, EasingFunction, EasingFunction)
- */
- @Deprecated
- public void animateXY(int durationMillisX, int durationMillisY, Easing.EasingOption easingX,
- Easing.EasingOption easingY) {
- mAnimator.animateXY(durationMillisX, durationMillisY, easingX, easingY);
- }
-
- /**
- * Animates the rendering of the chart on the x-axis with the specified
- * animation time. If animate(...) is called, no further calling of
- * invalidate() is necessary to refresh the chart. ANIMATIONS ONLY WORK FOR
- * API LEVEL 11 (Android 3.0.x) AND HIGHER.
- *
- * @param durationMillis
- * @param easing a predefined easing option
- *
- * @deprecated Use {@link #animateX(int, EasingFunction)}
- * @see #animateX(int, EasingFunction)
- */
- @Deprecated
- public void animateX(int durationMillis, Easing.EasingOption easing) {
- mAnimator.animateX(durationMillis, easing);
- }
-
- /**
- * Animates the rendering of the chart on the y-axis with the specified
- * animation time. If animate(...) is called, no further calling of
- * invalidate() is necessary to refresh the chart. ANIMATIONS ONLY WORK FOR
- * API LEVEL 11 (Android 3.0.x) AND HIGHER.
- *
- * @param durationMillis
- * @param easing a predefined easing option
- *
- * @deprecated Use {@link #animateY(int, EasingFunction)}
- * @see #animateY(int, EasingFunction)
- */
- @Deprecated
- public void animateY(int durationMillis, Easing.EasingOption easing) {
- mAnimator.animateY(durationMillis, easing);
- }
-
- /**
* ################ ################ ################ ################
* ANIMATIONS ONLY WORK FOR API LEVEL 11 (Android 3.0.x) AND HIGHER.
*/
diff --git a/MPChartLib/src/main/java/com/github/mikephil/charting/components/Legend.java b/MPChartLib/src/main/java/com/github/mikephil/charting/components/Legend.java
index fb1afc8b..e3782e7c 100644
--- a/MPChartLib/src/main/java/com/github/mikephil/charting/components/Legend.java
+++ b/MPChartLib/src/main/java/com/github/mikephil/charting/components/Legend.java
@@ -1,10 +1,8 @@
-
package com.github.mikephil.charting.components;
import android.graphics.DashPathEffect;
import android.graphics.Paint;
-import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.utils.ColorTemplate;
import com.github.mikephil.charting.utils.FSize;
import com.github.mikephil.charting.utils.Utils;
@@ -214,11 +212,6 @@ public class Legend extends ComponentBase {
mEntries = entries.toArray(new LegendEntry[entries.size()]);
}
- @Deprecated
- public Legend(List<Integer> colors, List<String> labels) {
- this(Utils.convertIntegers(colors), Utils.convertStrings(labels));
- }
-
/**
* This method sets the automatically computed colors for the legend. Use setCustom(...) to set custom colors.
*
@@ -424,109 +417,6 @@ public class Legend extends ComponentBase {
}
/**
- * This property is deprecated - Use `horizontalAlignment`, `verticalAlignment`, `orientation`, `drawInside`,
- * `direction`.
- */
- @Deprecated
- public LegendPosition getPosition() {
-
- if (mOrientation == LegendOrientation.VERTICAL
- && mHorizontalAlignment == LegendHorizontalAlignment.CENTER
- && mVerticalAlignment == LegendVerticalAlignment.CENTER) {
- return LegendPosition.PIECHART_CENTER;
- } else if (mOrientation == LegendOrientation.HORIZONTAL) {
- if (mVerticalAlignment == LegendVerticalAlignment.TOP)
- return mHorizontalAlignment == LegendHorizontalAlignment.LEFT
- ? LegendPosition.ABOVE_CHART_LEFT
- : (mHorizontalAlignment == LegendHorizontalAlignment.RIGHT
- ? LegendPosition.ABOVE_CHART_RIGHT
- : LegendPosition.ABOVE_CHART_CENTER);
- else
- return mHorizontalAlignment == LegendHorizontalAlignment.LEFT
- ? LegendPosition.BELOW_CHART_LEFT
- : (mHorizontalAlignment == LegendHorizontalAlignment.RIGHT
- ? LegendPosition.BELOW_CHART_RIGHT
- : LegendPosition.BELOW_CHART_CENTER);
- } else {
- if (mHorizontalAlignment == LegendHorizontalAlignment.LEFT)
- return mVerticalAlignment == LegendVerticalAlignment.TOP && mDrawInside
- ? LegendPosition.LEFT_OF_CHART_INSIDE
- : (mVerticalAlignment == LegendVerticalAlignment.CENTER
- ? LegendPosition.LEFT_OF_CHART_CENTER
- : LegendPosition.LEFT_OF_CHART);
- else
- return mVerticalAlignment == LegendVerticalAlignment.TOP && mDrawInside
- ? LegendPosition.RIGHT_OF_CHART_INSIDE
- : (mVerticalAlignment == LegendVerticalAlignment.CENTER
- ? LegendPosition.RIGHT_OF_CHART_CENTER
- : LegendPosition.RIGHT_OF_CHART);
- }
- }
-
- /**
- * This property is deprecated - Use `horizontalAlignment`, `verticalAlignment`, `orientation`, `drawInside`,
- * `direction`.
- */
- @Deprecated
- public void setPosition(LegendPosition newValue) {
-
- switch (newValue) {
- case LEFT_OF_CHART:
- case LEFT_OF_CHART_INSIDE:
- case LEFT_OF_CHART_CENTER:
- mHorizontalAlignment = LegendHorizontalAlignment.LEFT;
- mVerticalAlignment = newValue == LegendPosition.LEFT_OF_CHART_CENTER
- ? LegendVerticalAlignment.CENTER
- : LegendVerticalAlignment.TOP;
- mOrientation = LegendOrientation.VERTICAL;
- break;
-
- case RIGHT_OF_CHART:
- case RIGHT_OF_CHART_INSIDE:
- case RIGHT_OF_CHART_CENTER:
- mHorizontalAlignment = LegendHorizontalAlignment.RIGHT;
- mVerticalAlignment = newValue == LegendPosition.RIGHT_OF_CHART_CENTER
- ? LegendVerticalAlignment.CENTER
- : LegendVerticalAlignment.TOP;
- mOrientation = LegendOrientation.VERTICAL;
- break;
-
- case ABOVE_CHART_LEFT:
- case ABOVE_CHART_CENTER:
- case ABOVE_CHART_RIGHT:
- mHorizontalAlignment = newValue == LegendPosition.ABOVE_CHART_LEFT
- ? LegendHorizontalAlignment.LEFT
- : (newValue == LegendPosition.ABOVE_CHART_RIGHT
- ? LegendHorizontalAlignment.RIGHT
- : LegendHorizontalAlignment.CENTER);
- mVerticalAlignment = LegendVerticalAlignment.TOP;
- mOrientation = LegendOrientation.HORIZONTAL;
- break;
-
- case BELOW_CHART_LEFT:
- case BELOW_CHART_CENTER:
- case BELOW_CHART_RIGHT:
- mHorizontalAlignment = newValue == LegendPosition.BELOW_CHART_LEFT
- ? LegendHorizontalAlignment.LEFT
- : (newValue == LegendPosition.BELOW_CHART_RIGHT
- ? LegendHorizontalAlignment.RIGHT
- : LegendHorizontalAlignment.CENTER);
- mVerticalAlignment = LegendVerticalAlignment.BOTTOM;
- mOrientation = LegendOrientation.HORIZONTAL;
- break;
-
- case PIECHART_CENTER:
- mHorizontalAlignment = LegendHorizontalAlignment.CENTER;
- mVerticalAlignment = LegendVerticalAlignment.CENTER;
- mOrientation = LegendOrientation.VERTICAL;
- break;
- }
-
- mDrawInside = newValue == LegendPosition.LEFT_OF_CHART_INSIDE
- || newValue == LegendPosition.RIGHT_OF_CHART_INSIDE;
- }
-
- /**
* returns the horizontal alignment of the legend
*
* @return