Comment cleanup
This commit is contained in:
parent
42ceaa9aa2
commit
f927517bea
8 changed files with 5 additions and 143 deletions
|
@ -38,33 +38,6 @@ public class BubbleChart extends BarLineChartBase<BubbleData> implements BubbleD
|
|||
mRenderer = new BubbleChartRenderer(this, mAnimator, mViewPortHandler);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// protected void calcMinMax() {
|
||||
// super.calcMinMax();
|
||||
//
|
||||
// if (mXAxis.mAxisRange == 0 && mData.getYValCount() > 0)
|
||||
// mXAxis.mAxisRange = 1;
|
||||
//
|
||||
// mXAxis.mAxisMinimum = -0.5f;
|
||||
// mXAxis.mAxisMaximum = (float) mData.getXValCount() - 0.5f;
|
||||
//
|
||||
// if (mRenderer != null) {
|
||||
// for (IBubbleDataSet set : mData.getDataSets()) {
|
||||
//
|
||||
// final float xmin = set.getXMin();
|
||||
// final float xmax = set.getXMax();
|
||||
//
|
||||
// if (xmin < mXAxis.mAxisMinimum)
|
||||
// mXAxis.mAxisMinimum = xmin;
|
||||
//
|
||||
// if (xmax > mXAxis.mAxisMaximum)
|
||||
// mXAxis.mAxisMaximum = xmax;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// mXAxis.mAxisRange = Math.abs(mXAxis.mAxisMaximum - mXAxis.mAxisMinimum);
|
||||
// }
|
||||
|
||||
public BubbleData getBubbleData() {
|
||||
return mData;
|
||||
}
|
||||
|
|
|
@ -35,14 +35,6 @@ public class CandleStickChart extends BarLineChartBase<CandleData> implements Ca
|
|||
mXAxis.mAxisMinimum = -0.5f;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// protected void calcMinMax() {
|
||||
// super.calcMinMax();
|
||||
//
|
||||
// mXAxis.mAxisMaximum += 0.5f;
|
||||
// mXAxis.mAxisRange = Math.abs(mXAxis.mAxisMaximum - mXAxis.mAxisMinimum);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public CandleData getCandleData() {
|
||||
return mData;
|
||||
|
|
|
@ -82,37 +82,6 @@ public class CombinedChart extends BarLineChartBase<CombinedData> implements Lin
|
|||
// mViewPortHandler);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// protected void calcMinMax() {
|
||||
// super.calcMinMax();
|
||||
//
|
||||
// if (getBarData() != null || getCandleData() != null || getBubbleData() != null) {
|
||||
// mXAxis.mAxisMinimum = -0.5f;
|
||||
// mXAxis.mAxisMaximum = mData.getXVals().size() - 0.5f;
|
||||
//
|
||||
// if (getBubbleData() != null) {
|
||||
//
|
||||
// for (IBubbleDataSet set : getBubbleData().getDataSets()) {
|
||||
//
|
||||
// final float xmin = set.getXMin();
|
||||
// final float xmax = set.getXMax();
|
||||
//
|
||||
// if (xmin < mXAxis.mAxisMinimum)
|
||||
// mXAxis.mAxisMinimum = xmin;
|
||||
//
|
||||
// if (xmax > mXAxis.mAxisMaximum)
|
||||
// mXAxis.mAxisMaximum = xmax;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// mXAxis.mAxisRange = Math.abs(mXAxis.mAxisMaximum - mXAxis.mAxisMinimum);
|
||||
//
|
||||
// if (mXAxis.mAxisRange == 0.f && getLineData() != null && getLineData().getYValCount() > 0) {
|
||||
// mXAxis.mAxisRange = 1.f;
|
||||
// }
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void setData(CombinedData data) {
|
||||
mData = null;
|
||||
|
|
|
@ -201,38 +201,4 @@ public class HorizontalBarChart extends BarChart {
|
|||
mViewPortHandler.contentTop());
|
||||
return (float) Math.min(mXAxis.mAxisMaximum, pos.y);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Returns the lowest x-index (value on the x-axis) that is still visible on the chart.
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public float getLowestVisibleX() {
|
||||
//
|
||||
// float step = mData.getDataSetCount();
|
||||
// float div = (step <= 1) ? 1 : step + mData.getGroupSpace();
|
||||
//
|
||||
// float[] pts = new float[] { mViewPortHandler.contentLeft(), mViewPortHandler.contentBottom() };
|
||||
//
|
||||
// getTransformer(AxisDependency.LEFT).pixelsToValue(pts);
|
||||
// return (((pts[1] <= 0) ? 0 : ((pts[1])) / div) + 1);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Returns the highest x-index (value on the x-axis) that is still visible on the chart.
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public float getHighestVisibleX() {
|
||||
//
|
||||
// float step = mData.getDataSetCount();
|
||||
// float div = (step <= 1) ? 1 : step + mData.getGroupSpace();
|
||||
//
|
||||
// float[] pts = new float[] { mViewPortHandler.contentLeft(), mViewPortHandler.contentTop() };
|
||||
//
|
||||
// getTransformer(AxisDependency.LEFT).pixelsToValue(pts);
|
||||
// return ((pts[1] >= getXChartMax()) ? getXChartMax() / div : (pts[1] / div));
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -33,14 +33,6 @@ public class LineChart extends BarLineChartBase<LineData> implements LineDataPro
|
|||
|
||||
mRenderer = new LineChartRenderer(this, mAnimator, mViewPortHandler);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// protected void calcMinMax() {
|
||||
// super.calcMinMax();
|
||||
//
|
||||
// if (mXAxis.mAxisRange == 0 && mData.getYValCount() > 0)
|
||||
// mXAxis.mAxisRange = 1;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public LineData getLineData() {
|
||||
|
|
|
@ -12,7 +12,7 @@ import com.github.mikephil.charting.renderer.ScatterChartRenderer;
|
|||
* The ScatterChart. Draws dots, triangles, squares and custom shapes into the
|
||||
* Chart-View. CIRCLE and SCQUARE offer the best performance, TRIANGLE has the
|
||||
* worst performance.
|
||||
*
|
||||
*
|
||||
* @author Philipp Jahoda
|
||||
*/
|
||||
public class ScatterChart extends BarLineChartBase<ScatterData> implements ScatterDataProvider {
|
||||
|
@ -41,32 +41,20 @@ public class ScatterChart extends BarLineChartBase<ScatterData> implements Scatt
|
|||
super.init();
|
||||
|
||||
mRenderer = new ScatterChartRenderer(this, mAnimator, mViewPortHandler);
|
||||
// mXAxis.mAxisMinimum = -0.5f;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// protected void calcMinMax() {
|
||||
// super.calcMinMax();
|
||||
//
|
||||
// if (mXAxis.mAxisRange == 0 && mData.getEntryCount() > 0)
|
||||
// mXAxis.mAxisRange = 1;
|
||||
//
|
||||
// mXAxis.mAxisMaximum += 0.5f;
|
||||
// mXAxis.mAxisRange = Math.abs(mXAxis.mAxisMaximum - mXAxis.mAxisMinimum);
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns all possible predefined ScatterShapes.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static ScatterShape[] getAllPossibleShapes() {
|
||||
return new ScatterShape[] {
|
||||
return new ScatterShape[]{
|
||||
ScatterShape.SQUARE, ScatterShape.CIRCLE, ScatterShape.TRIANGLE, ScatterShape.CROSS
|
||||
};
|
||||
}
|
||||
|
||||
public ScatterData getScatterData() {
|
||||
return mData;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ public class Approximator {
|
|||
points = new float[]{x1, y1, x2, y2};
|
||||
}
|
||||
|
||||
float distance(float x, float y) {
|
||||
public float distance(float x, float y) {
|
||||
return Math.abs(dy * x - dx * y + sxey - exsy) / length;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package com.github.mikephil.charting.renderer;
|
||||
|
||||
import com.github.mikephil.charting.interfaces.dataprovider.BarLineScatterCandleBubbleDataProvider;
|
||||
import com.github.mikephil.charting.utils.ViewPortHandler;
|
||||
|
||||
/**
|
||||
|
@ -19,21 +18,4 @@ public abstract class Renderer {
|
|||
public Renderer(ViewPortHandler viewPortHandler) {
|
||||
this.mViewPortHandler = viewPortHandler;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the specified value fits in between the provided min
|
||||
* and max bounds, false if not.
|
||||
*
|
||||
* @param val
|
||||
* @param min
|
||||
* @param max
|
||||
* @return
|
||||
*/
|
||||
protected boolean fitsBounds(float val, float min, float max) {
|
||||
|
||||
if (val < min || val > max)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue