Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import android.util.Log;
import android.view.MotionEvent;

import com.github.mikephil.charting.animation.Easing;
import com.github.mikephil.charting.animation.Easing.EasingFunction;
import com.github.mikephil.charting.components.Legend;
import com.github.mikephil.charting.components.XAxis;
Expand Down Expand Up @@ -253,10 +252,6 @@ public void calculateOffsets() {
* returns the angle relative to the chart center for the given point on the
* chart in degrees. The angle is always between 0 and 360°, 0° is NORTH,
* 90° is EAST, ...
*
* @param x
* @param y
* @return
*/
public float getAngleForPoint(float x, float y) {

Expand Down Expand Up @@ -287,11 +282,7 @@ public float getAngleForPoint(float x, float y) {
* Returns a recyclable MPPointF instance.
* Calculates the position around a center point, depending on the distance
* from the center, and the angle of the position around the center.
*
* @param center
* @param dist
* @param angle in degrees, converted to radians internally
* @return
*/
public MPPointF getPosition(MPPointF center, float dist, float angle) {

Expand All @@ -306,12 +297,7 @@ public void getPosition(MPPointF center, float dist, float angle, MPPointF outpu
}

/**
* Returns the distance of a certain point on the chart to the center of the
* chart.
*
* @param x
* @param y
* @return
* Returns the distance of a certain point on the chart to the center of the chart.
*/
public float distanceToCenter(float x, float y) {

Expand Down Expand Up @@ -345,17 +331,12 @@ public float distanceToCenter(float x, float y) {
/**
* Returns the xIndex for the given angle around the center of the chart.
* Returns -1 if not found / outofbounds.
*
* @param angle
* @return
*/
public abstract int getIndexForAngle(float angle);

/**
* Set an offset for the rotation of the RadarChart in degrees. Default 270f
* --> top (NORTH)
*
* @param angle
*/
public void setRotationAngle(float angle) {
mRawRotationAngle = angle;
Expand All @@ -367,8 +348,6 @@ public void setRotationAngle(float angle) {
* returned value could be any value, negative or positive, outside of the
* 360 degrees. this is used when working with rotation direction, mainly by
* gestures and animations.
*
* @return
*/
public float getRawRotationAngle() {
return mRawRotationAngle;
Expand All @@ -377,8 +356,6 @@ public float getRawRotationAngle() {
/**
* gets a normalized version of the current rotation angle of the pie chart,
* which will always be between 0.0 < 360.0
*
* @return
*/
public float getRotationAngle() {
return mRotationAngle;
Expand All @@ -387,17 +364,13 @@ public float getRotationAngle() {
/**
* Set this to true to enable the rotation / spinning of the chart by touch.
* Set it to false to disable it. Default: true
*
* @param enabled
*/
public void setRotationEnabled(boolean enabled) {
mRotateEnabled = enabled;
}

/**
* Returns true if rotation of the chart by touch is enabled, false if not.
*
* @return
*/
public boolean isRotationEnabled() {
return mRotateEnabled;
Expand All @@ -419,8 +392,6 @@ public void setMinOffset(float minOffset) {

/**
* returns the diameter of the pie- or radar-chart
*
* @return
*/
public float getDiameter() {
RectF content = mViewPortHandler.getContentRect();
Expand All @@ -433,23 +404,17 @@ public float getDiameter() {

/**
* Returns the radius of the chart in pixels.
*
* @return
*/
public abstract float getRadius();

/**
* Returns the required offset for the chart legend.
*
* @return
*/
protected abstract float getRequiredLegendOffset();

/**
* Returns the base offset needed for the chart without calculating the
* legend size.
*
* @return
*/
protected abstract float getRequiredBaseOffset();

Expand All @@ -465,17 +430,8 @@ public float getYChartMin() {
return 0;
}

/**
* ################ ################ ################ ################
*/
/** CODE BELOW THIS RELATED TO ANIMATION */

/**
* Applys a spin animation to the Chart.
*
* @param durationmillis
* @param fromangle
* @param toangle
*/
@SuppressLint("NewApi")
public void spin(int durationmillis, float fromangle, float toangle, EasingFunction easing) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ public XAxisPosition getPosition() {

/**
* sets the position of the x-labels
*
* @param pos
*/
public void setPosition(XAxisPosition pos) {
mPosition = pos;
Expand All @@ -88,17 +86,13 @@ public void setLabelRotationAngle(float angle) {
/**
* if set to true, the chart will avoid that the first and last label entry
* in the chart "clip" off the edge of the chart or the screen
*
* @param enabled
*/
public void setAvoidFirstLastClipping(boolean enabled) {
mAvoidFirstLastClipping = enabled;
}

/**
* returns true if avoid-first-lastclipping is enabled, false if not
*
* @return
*/
public boolean isAvoidFirstLastClippingEnabled() {
return mAvoidFirstLastClipping;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public BarDataSet(List<BarEntry> yVals, String label) {

@Override
public DataSet<BarEntry> copy() {
List<BarEntry> entries = new ArrayList<BarEntry>();
List<BarEntry> entries = new ArrayList<>();
for (int i = 0; i < mEntries.size(); i++) {
entries.add(mEntries.get(i).copy());
}
Expand Down
Loading
Loading