Cleanup recently noticed refactoring fail
This commit is contained in:
parent
1dd8c901d6
commit
22c7a6dc03
74 changed files with 367 additions and 367 deletions
|
@ -53,7 +53,7 @@ public class AnotherBarActivity extends DemoBase implements OnSeekBarChangeListe
|
|||
// drawn
|
||||
mChart.setMaxVisibleValueCount(60);
|
||||
|
||||
// scaling can now only be done on xPx- and yPx-axis separately
|
||||
// scaling can now only be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(false);
|
||||
|
||||
mChart.setDrawBarShadow(false);
|
||||
|
|
|
@ -76,7 +76,7 @@ public class BarChartActivity extends DemoBase implements OnSeekBarChangeListene
|
|||
// drawn
|
||||
mChart.setMaxVisibleValueCount(60);
|
||||
|
||||
// scaling can now only be done on xPx- and yPx-axis separately
|
||||
// scaling can now only be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(false);
|
||||
|
||||
mChart.setDrawGridBackground(false);
|
||||
|
@ -276,7 +276,7 @@ public class BarChartActivity extends DemoBase implements OnSeekBarChangeListene
|
|||
Log.i("bounds", bounds.toString());
|
||||
Log.i("position", position.toString());
|
||||
|
||||
Log.i("xPx-index",
|
||||
Log.i("x-index",
|
||||
"low: " + mChart.getLowestVisibleX() + ", high: "
|
||||
+ mChart.getHighestVisibleX());
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class BarChartActivityMultiDataset extends DemoBase implements OnSeekBarC
|
|||
|
||||
// mChart.setDrawBorders(true);
|
||||
|
||||
// scaling can now only be done on xPx- and yPx-axis separately
|
||||
// scaling can now only be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(false);
|
||||
|
||||
mChart.setDrawBarShadow(false);
|
||||
|
|
|
@ -62,7 +62,7 @@ public class BarChartActivitySinus extends DemoBase implements OnSeekBarChangeLi
|
|||
// drawn
|
||||
mChart.setMaxVisibleValueCount(60);
|
||||
|
||||
// scaling can now only be done on xPx- and yPx-axis separately
|
||||
// scaling can now only be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(false);
|
||||
|
||||
// draw shadows for each bar that show the maximum yValue
|
||||
|
|
|
@ -48,7 +48,7 @@ public class BarChartPositiveNegative extends DemoBase {
|
|||
|
||||
mChart.setDescription("");
|
||||
|
||||
// scaling can now only be done on xPx- and yPx-axis separately
|
||||
// scaling can now only be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(false);
|
||||
|
||||
mChart.setDrawGridBackground(false);
|
||||
|
|
|
@ -56,7 +56,7 @@ public class CandleStickChartActivity extends DemoBase implements OnSeekBarChang
|
|||
// drawn
|
||||
mChart.setMaxVisibleValueCount(60);
|
||||
|
||||
// scaling can now only be done on xPx- and yPx-axis separately
|
||||
// scaling can now only be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(false);
|
||||
|
||||
mChart.setDrawGridBackground(false);
|
||||
|
|
|
@ -68,7 +68,7 @@ public class CubicLineChartActivity extends DemoBase implements OnSeekBarChangeL
|
|||
mChart.setDragEnabled(true);
|
||||
mChart.setScaleEnabled(true);
|
||||
|
||||
// if disabled, scaling can be done on xPx- and yPx-axis separately
|
||||
// if disabled, scaling can be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(false);
|
||||
|
||||
mChart.setDrawGridBackground(false);
|
||||
|
|
|
@ -69,7 +69,7 @@ public class DrawChartActivity extends DemoBase implements OnChartValueSelectedL
|
|||
mChart.getLegend().setEnabled(false);
|
||||
|
||||
// mChart.setYRange(-40f, 40f, true);
|
||||
// call this to reset the changed yPx-range
|
||||
// call this to reset the changed y-range
|
||||
// mChart.resetYRange(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ public class HorizontalBarChartActivity extends DemoBase implements OnSeekBarCha
|
|||
// drawn
|
||||
mChart.setMaxVisibleValueCount(60);
|
||||
|
||||
// scaling can now only be done on xPx- and yPx-axis separately
|
||||
// scaling can now only be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(false);
|
||||
|
||||
// draw shadows for each bar that show the maximum yValue
|
||||
|
|
|
@ -70,7 +70,7 @@ public class InvertedLineChartActivity extends DemoBase implements OnSeekBarChan
|
|||
mChart.setDragEnabled(true);
|
||||
mChart.setScaleEnabled(true);
|
||||
|
||||
// if disabled, scaling can be done on xPx- and yPx-axis separately
|
||||
// if disabled, scaling can be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(true);
|
||||
|
||||
// set an alternative background color
|
||||
|
|
|
@ -83,7 +83,7 @@ public class LineChartActivity1 extends DemoBase implements OnSeekBarChangeListe
|
|||
// mChart.setScaleXEnabled(true);
|
||||
// mChart.setScaleYEnabled(true);
|
||||
|
||||
// if disabled, scaling can be done on xPx- and yPx-axis separately
|
||||
// if disabled, scaling can be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(true);
|
||||
|
||||
// set an alternative background color
|
||||
|
@ -96,7 +96,7 @@ public class LineChartActivity1 extends DemoBase implements OnSeekBarChangeListe
|
|||
// set the marker to the chart
|
||||
mChart.setMarkerView(mv);
|
||||
|
||||
// xPx-axis limit line
|
||||
// x-axis limit line
|
||||
LimitLine llXAxis = new LimitLine(10f, "Index 10");
|
||||
llXAxis.setLineWidth(4f);
|
||||
llXAxis.enableDashedLine(10f, 10f, 0f);
|
||||
|
@ -105,7 +105,7 @@ public class LineChartActivity1 extends DemoBase implements OnSeekBarChangeListe
|
|||
|
||||
XAxis xAxis = mChart.getXAxis();
|
||||
//xAxis.setValueFormatter(new MyCustomXAxisValueFormatter());
|
||||
//xAxis.addLimitLine(llXAxis); // add xPx-axis limit line
|
||||
//xAxis.addLimitLine(llXAxis); // add x-axis limit line
|
||||
|
||||
Typeface tf = Typeface.createFromAsset(getAssets(), "OpenSans-Regular.ttf");
|
||||
|
||||
|
@ -344,7 +344,7 @@ public class LineChartActivity1 extends DemoBase implements OnSeekBarChangeListe
|
|||
float mult = (range + 1);
|
||||
float val = (float) (Math.random() * mult) + 3;// + (float)
|
||||
// ((mult *
|
||||
// 0.1) / 10);xPx
|
||||
// 0.1) / 10);x
|
||||
yVals.add(new Entry(i, val));
|
||||
}
|
||||
|
||||
|
@ -396,7 +396,7 @@ public class LineChartActivity1 extends DemoBase implements OnSeekBarChangeListe
|
|||
|
||||
@Override
|
||||
public void onChartGestureStart(MotionEvent me, ChartTouchListener.ChartGesture lastPerformedGesture) {
|
||||
Log.i("Gesture", "START, xPx: " + me.getX() + ", yPx: " + me.getY());
|
||||
Log.i("Gesture", "START, x: " + me.getX() + ", y: " + me.getY());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -75,7 +75,7 @@ public class LineChartActivity2 extends DemoBase implements OnSeekBarChangeListe
|
|||
mChart.setDrawGridBackground(false);
|
||||
mChart.setHighlightPerDragEnabled(true);
|
||||
|
||||
// if disabled, scaling can be done on xPx- and yPx-axis separately
|
||||
// if disabled, scaling can be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(true);
|
||||
|
||||
// set an alternative background color
|
||||
|
|
|
@ -72,7 +72,7 @@ public class LineChartActivityColored extends DemoBase {
|
|||
chart.setDragEnabled(true);
|
||||
chart.setScaleEnabled(true);
|
||||
|
||||
// if disabled, scaling can be done on xPx- and yPx-axis separately
|
||||
// if disabled, scaling can be done on x- and y-axis separately
|
||||
chart.setPinchZoom(false);
|
||||
|
||||
chart.setBackgroundColor(color);
|
||||
|
|
|
@ -72,7 +72,7 @@ public class LineChartTime extends DemoBase implements OnSeekBarChangeListener {
|
|||
mChart.setDrawGridBackground(false);
|
||||
mChart.setHighlightPerDragEnabled(true);
|
||||
|
||||
// if disabled, scaling can be done on xPx- and yPx-axis separately
|
||||
// if disabled, scaling can be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(true);
|
||||
|
||||
// set an alternative background color
|
||||
|
@ -102,7 +102,7 @@ public class LineChartTime extends DemoBase implements OnSeekBarChangeListener {
|
|||
xAxis.setTextColor(Color.WHITE);
|
||||
xAxis.setDrawAxisLine(false);
|
||||
|
||||
// custom xPx-axis min / max
|
||||
// custom x-axis min / max
|
||||
xAxis.setAxisMinValue(5000);
|
||||
xAxis.setAxisMaxValue(30000);
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ public class MultiLineChartActivity extends DemoBase implements OnSeekBarChangeL
|
|||
mChart.setDragEnabled(true);
|
||||
mChart.setScaleEnabled(true);
|
||||
|
||||
// if disabled, scaling can be done on xPx- and yPx-axis separately
|
||||
// if disabled, scaling can be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(false);
|
||||
|
||||
mSeekBarX.setProgress(20);
|
||||
|
|
|
@ -52,7 +52,7 @@ public class PerformanceLineChart extends DemoBase implements OnSeekBarChangeLis
|
|||
mChart.setDragEnabled(true);
|
||||
mChart.setScaleEnabled(true);
|
||||
|
||||
// if disabled, scaling can be done on xPx- and yPx-axis separately
|
||||
// if disabled, scaling can be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(false);
|
||||
|
||||
mChart.getAxisLeft().setDrawGridLines(false);
|
||||
|
|
|
@ -52,7 +52,7 @@ public class RealtimeLineChartActivity extends DemoBase implements
|
|||
mChart.setScaleEnabled(true);
|
||||
mChart.setDrawGridBackground(false);
|
||||
|
||||
// if disabled, scaling can be done on xPx- and yPx-axis separately
|
||||
// if disabled, scaling can be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(true);
|
||||
|
||||
// set an alternative background color
|
||||
|
|
|
@ -30,7 +30,7 @@ public class ScrollViewActivity extends DemoBase {
|
|||
|
||||
mChart.setDescription("");
|
||||
|
||||
// scaling can now only be done on xPx- and yPx-axis separately
|
||||
// scaling can now only be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(false);
|
||||
|
||||
mChart.setDrawBarShadow(false);
|
||||
|
|
|
@ -62,7 +62,7 @@ public class StackedBarActivity extends DemoBase implements OnSeekBarChangeListe
|
|||
// drawn
|
||||
mChart.setMaxVisibleValueCount(40);
|
||||
|
||||
// scaling can now only be done on xPx- and yPx-axis separately
|
||||
// scaling can now only be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(false);
|
||||
|
||||
mChart.setDrawGridBackground(false);
|
||||
|
@ -70,7 +70,7 @@ public class StackedBarActivity extends DemoBase implements OnSeekBarChangeListe
|
|||
|
||||
mChart.setDrawValueAboveBar(false);
|
||||
|
||||
// change the position of the yPx-labels
|
||||
// change the position of the y-labels
|
||||
YAxis leftAxis = mChart.getAxisLeft();
|
||||
leftAxis.setValueFormatter(new MyAxisValueFormatter());
|
||||
leftAxis.setAxisMinValue(0f); // this replaces setStartAtZero(true)
|
||||
|
|
|
@ -51,7 +51,7 @@ public class StackedBarActivityNegative extends DemoBase implements
|
|||
mChart.setDrawGridBackground(false);
|
||||
mChart.setDescription("");
|
||||
|
||||
// scaling can now only be done on xPx- and yPx-axis separately
|
||||
// scaling can now only be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(false);
|
||||
|
||||
mChart.setDrawBarShadow(false);
|
||||
|
|
|
@ -23,9 +23,9 @@ public class MyCustomXAxisValueFormatter implements AxisValueFormatter {
|
|||
@Override
|
||||
public String getFormattedValue(float value, AxisBase axis) {
|
||||
|
||||
//Log.i("TRANS", "xPx: " + viewPortHandler.getTransX() + ", yPx: " + viewPortHandler.getTransY());
|
||||
//Log.i("TRANS", "x: " + viewPortHandler.getTransX() + ", y: " + viewPortHandler.getTransY());
|
||||
|
||||
// e.g. adjust the xPx-axis values depending on scale / zoom level
|
||||
// e.g. adjust the x-axis values depending on scale / zoom level
|
||||
if (mViewPortHandler.getScaleX() > 5)
|
||||
return "4";
|
||||
else if (mViewPortHandler.getScaleX() > 3)
|
||||
|
|
|
@ -66,7 +66,7 @@ public class MainActivity extends Activity implements OnItemClickListener {
|
|||
|
||||
objects.add(new ContentItem("Line Chart", "A simple demonstration of the linechart."));
|
||||
objects.add(new ContentItem("Line Chart (Dual YAxis)",
|
||||
"Demonstration of the linechart with dual yPx-axis."));
|
||||
"Demonstration of the linechart with dual y-axis."));
|
||||
objects.add(new ContentItem("Bar Chart", "A simple demonstration of the bar chart."));
|
||||
objects.add(new ContentItem("Horizontal Bar Chart",
|
||||
"A simple demonstration of the horizontal bar chart."));
|
||||
|
@ -97,7 +97,7 @@ public class MainActivity extends Activity implements OnItemClickListener {
|
|||
"Demonstrates the usage of different chart types inside a ListView."));
|
||||
objects.add(new ContentItem(
|
||||
"Inverted Line Chart",
|
||||
"Demonstrates the feature of inverting the yPx-axis."));
|
||||
"Demonstrates the feature of inverting the y-axis."));
|
||||
objects.add(new ContentItem(
|
||||
"Candle Stick Chart",
|
||||
"Demonstrates usage of the CandleStickChart."));
|
||||
|
@ -112,7 +112,7 @@ public class MainActivity extends Activity implements OnItemClickListener {
|
|||
"Shows a LineChart with different background and line color."));
|
||||
objects.add(new ContentItem(
|
||||
"Realtime Chart",
|
||||
"This chart is fed with new data in realtime. It also restrains the view on the xPx-axis."));
|
||||
"This chart is fed with new data in realtime. It also restrains the view on the x-axis."));
|
||||
objects.add(new ContentItem(
|
||||
"Dynamical data adding",
|
||||
"This Activity demonstrates dynamical adding of Entries and DataSets (real time graph)."));
|
||||
|
|
|
@ -52,7 +52,7 @@ public abstract class RealmBaseActivity extends DemoBase {
|
|||
mChart.setDragEnabled(true);
|
||||
mChart.setScaleEnabled(true);
|
||||
|
||||
// if disabled, scaling can be done on xPx- and yPx-axis separately
|
||||
// if disabled, scaling can be done on x- and y-axis separately
|
||||
mChart.setPinchZoom(false);
|
||||
|
||||
YAxis leftAxis = mChart.getAxisLeft();
|
||||
|
|
|
@ -7,7 +7,7 @@ import android.annotation.SuppressLint;
|
|||
|
||||
/**
|
||||
* Object responsible for all animations in the Chart. ANIMATIONS ONLY WORK FOR
|
||||
* API LEVEL 11 (Android 3.0.xPx) AND HIGHER.
|
||||
* API LEVEL 11 (Android 3.0.x) AND HIGHER.
|
||||
*
|
||||
* @author Philipp Jahoda
|
||||
*/
|
||||
|
@ -29,10 +29,10 @@ public class ChartAnimator {
|
|||
*/
|
||||
/** CODE BELOW THIS RELATED TO ANIMATION */
|
||||
|
||||
/** the phase that is animated and influences the drawn values on the yPx-axis */
|
||||
/** the phase that is animated and influences the drawn values on the y-axis */
|
||||
protected float mPhaseY = 1f;
|
||||
|
||||
/** the phase that is animated and influences the drawn values on the xPx-axis */
|
||||
/** the phase that is animated and influences the drawn values on the x-axis */
|
||||
protected float mPhaseX = 1f;
|
||||
|
||||
/**
|
||||
|
@ -41,7 +41,7 @@ public class ChartAnimator {
|
|||
/** METHODS FOR CUSTOM EASING */
|
||||
|
||||
/**
|
||||
* Animates the drawing / rendering of the chart on both xPx- and yPx-axis with
|
||||
* 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.
|
||||
*
|
||||
|
@ -78,7 +78,7 @@ public class ChartAnimator {
|
|||
}
|
||||
|
||||
/**
|
||||
* Animates the rendering of the chart on the xPx-axis with the specified
|
||||
* 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.
|
||||
*
|
||||
|
@ -98,7 +98,7 @@ public class ChartAnimator {
|
|||
}
|
||||
|
||||
/**
|
||||
* Animates the rendering of the chart on the yPx-axis with the specified
|
||||
* 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.
|
||||
*
|
||||
|
@ -123,7 +123,7 @@ public class ChartAnimator {
|
|||
/** METHODS FOR PREDEFINED EASING */
|
||||
|
||||
/**
|
||||
* Animates the drawing / rendering of the chart on both xPx- and yPx-axis with
|
||||
* 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.
|
||||
*
|
||||
|
@ -160,7 +160,7 @@ public class ChartAnimator {
|
|||
}
|
||||
|
||||
/**
|
||||
* Animates the rendering of the chart on the xPx-axis with the specified
|
||||
* 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.
|
||||
*
|
||||
|
@ -180,7 +180,7 @@ public class ChartAnimator {
|
|||
}
|
||||
|
||||
/**
|
||||
* Animates the rendering of the chart on the yPx-axis with the specified
|
||||
* 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.
|
||||
*
|
||||
|
@ -205,7 +205,7 @@ public class ChartAnimator {
|
|||
/** METHODS FOR ANIMATION WITHOUT EASING */
|
||||
|
||||
/**
|
||||
* Animates the drawing / rendering of the chart on both xPx- and yPx-axis with
|
||||
* 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.
|
||||
*
|
||||
|
@ -237,7 +237,7 @@ public class ChartAnimator {
|
|||
}
|
||||
|
||||
/**
|
||||
* Animates the rendering of the chart on the xPx-axis with the specified
|
||||
* 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.
|
||||
*
|
||||
|
@ -255,7 +255,7 @@ public class ChartAnimator {
|
|||
}
|
||||
|
||||
/**
|
||||
* Animates the rendering of the chart on the yPx-axis with the specified
|
||||
* 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.
|
||||
*
|
||||
|
@ -273,7 +273,7 @@ public class ChartAnimator {
|
|||
}
|
||||
|
||||
/**
|
||||
* This gets the yPx-phase that is used to animate the values.
|
||||
* This gets the y-phase that is used to animate the values.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -282,7 +282,7 @@ public class ChartAnimator {
|
|||
}
|
||||
|
||||
/**
|
||||
* This modifys the yPx-phase that is used to animate the values.
|
||||
* This modifys the y-phase that is used to animate the values.
|
||||
*
|
||||
* @param phase
|
||||
*/
|
||||
|
@ -291,7 +291,7 @@ public class ChartAnimator {
|
|||
}
|
||||
|
||||
/**
|
||||
* This gets the xPx-phase that is used to animate the values.
|
||||
* This gets the x-phase that is used to animate the values.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -300,7 +300,7 @@ public class ChartAnimator {
|
|||
}
|
||||
|
||||
/**
|
||||
* This modifys the xPx-phase that is used to animate the values.
|
||||
* This modifys the x-phase that is used to animate the values.
|
||||
*
|
||||
* @param phase
|
||||
*/
|
||||
|
|
|
@ -15,19 +15,19 @@ public abstract class AbstractBuffer<T> {
|
|||
/** index in the buffer */
|
||||
protected int index = 0;
|
||||
|
||||
/** float-buffer that holds the data points to draw, order: xPx,yPx,xPx,yPx,... */
|
||||
/** float-buffer that holds the data points to draw, order: x,y,x,y,... */
|
||||
public final float[] buffer;
|
||||
|
||||
/** animation phase xPx-axis */
|
||||
/** animation phase x-axis */
|
||||
protected float phaseX = 1f;
|
||||
|
||||
/** animation phase yPx-axis */
|
||||
/** animation phase y-axis */
|
||||
protected float phaseY = 1f;
|
||||
|
||||
/** indicates from which xPx-index the visible data begins */
|
||||
/** indicates from which x-index the visible data begins */
|
||||
protected int mFrom = 0;
|
||||
|
||||
/** indicates to which xPx-index the visible data ranges */
|
||||
/** indicates to which x-index the visible data ranges */
|
||||
protected int mTo = 0;
|
||||
|
||||
/**
|
||||
|
@ -40,14 +40,14 @@ public abstract class AbstractBuffer<T> {
|
|||
buffer = new float[size];
|
||||
}
|
||||
|
||||
/** limits the drawing on the xPx-axis */
|
||||
/** limits the drawing on the x-axis */
|
||||
public void limitFrom(int from) {
|
||||
if (from < 0)
|
||||
from = 0;
|
||||
mFrom = from;
|
||||
}
|
||||
|
||||
/** limits the drawing on the xPx-axis */
|
||||
/** limits the drawing on the x-axis */
|
||||
public void limitTo(int to) {
|
||||
if (to < 0)
|
||||
to = 0;
|
||||
|
|
|
@ -80,7 +80,7 @@ public class BarChart extends BarLineChartBase<BarData> implements BarDataProvid
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the Highlight object (contains xPx-index and DataSet index) of the selected yValue at the given touch
|
||||
* Returns the Highlight object (contains x-index and DataSet index) of the selected yValue at the given touch
|
||||
* point
|
||||
* inside the BarChart.
|
||||
*
|
||||
|
@ -203,7 +203,7 @@ public class BarChart extends BarLineChartBase<BarData> implements BarDataProvid
|
|||
|
||||
|
||||
// /**
|
||||
// * Returns the lowest xPx-index (yValue on the xPx-axis) that is still visible on the chart.
|
||||
// * Returns the lowest x-index (yValue on the x-axis) that is still visible on the chart.
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
|
@ -220,7 +220,7 @@ public class BarChart extends BarLineChartBase<BarData> implements BarDataProvid
|
|||
// }
|
||||
//
|
||||
// /**
|
||||
// * Returns the highest xPx-index (yValue on the xPx-axis) that is still visible on the chart.
|
||||
// * Returns the highest x-index (yValue on the x-axis) that is still visible on the chart.
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
|
|
|
@ -55,15 +55,15 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
protected int mMaxVisibleCount = 100;
|
||||
|
||||
/**
|
||||
* flag that indicates if auto scaling on the yPx axis is enabled
|
||||
* flag that indicates if auto scaling on the y axis is enabled
|
||||
*/
|
||||
protected boolean mAutoScaleMinMaxEnabled = false;
|
||||
private Float mAutoScaleLastLowestVisibleXIndex = null;
|
||||
private Float mAutoScaleLastHighestVisibleXIndex = null;
|
||||
|
||||
/**
|
||||
* flag that indicates if pinch-zoom is enabled. if true, both xPx and yPx axis
|
||||
* can be scaled with 2 fingers, if false, xPx and yPx axis can be scaled
|
||||
* flag that indicates if pinch-zoom is enabled. if true, both x and y axis
|
||||
* can be scaled with 2 fingers, if false, x and y axis can be scaled
|
||||
* separately
|
||||
*/
|
||||
protected boolean mPinchZoomEnabled = false;
|
||||
|
@ -122,12 +122,12 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
protected OnDrawListener mDrawListener;
|
||||
|
||||
/**
|
||||
* the object representing the labels on the left yPx-axis
|
||||
* the object representing the labels on the left y-axis
|
||||
*/
|
||||
protected YAxis mAxisLeft;
|
||||
|
||||
/**
|
||||
* the object representing the labels on the right yPx-axis
|
||||
* the object representing the labels on the right y-axis
|
||||
*/
|
||||
protected YAxis mAxisRight;
|
||||
|
||||
|
@ -357,7 +357,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
if (mAutoScaleMinMaxEnabled)
|
||||
mData.calcMinMax();
|
||||
|
||||
// // calculate / set xPx-axis range
|
||||
// // calculate / set x-axis range
|
||||
// mXAxis.mAxisMaximum = mData.getXVals().size() - 1;
|
||||
// mXAxis.mAxisRange = Math.abs(mXAxis.mAxisMaximum - mXAxis.mAxisMinimum);
|
||||
|
||||
|
@ -467,7 +467,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
offsetRight += mOffsetsBuffer.right;
|
||||
offsetBottom += mOffsetsBuffer.bottom;
|
||||
|
||||
// offsets for yPx-labels
|
||||
// offsets for y-labels
|
||||
if (mAxisLeft.needsOffset()) {
|
||||
offsetLeft += mAxisLeft.getRequiredWidthSpace(mAxisRendererLeft
|
||||
.getPaintAxisLabels());
|
||||
|
@ -482,7 +482,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
|
||||
float xlabelheight = mXAxis.mLabelRotatedHeight + mXAxis.getYOffset();
|
||||
|
||||
// offsets for xPx-labels
|
||||
// offsets for x-labels
|
||||
if (mXAxis.getPosition() == XAxisPosition.BOTTOM) {
|
||||
|
||||
offsetBottom += xlabelheight;
|
||||
|
@ -634,7 +634,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
}
|
||||
|
||||
/**
|
||||
* Zooms in or out by the given scale factor. xPx and yPx are the coordinates
|
||||
* Zooms in or out by the given scale factor. x and y are the coordinates
|
||||
* (in pixels) of the zoom center.
|
||||
*
|
||||
* @param scaleX if < 1f --> zoom out, if > 1f --> zoom in
|
||||
|
@ -722,12 +722,12 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the size of the area (range on the xPx-axis) that should be maximum
|
||||
* Sets the size of the area (range on the x-axis) that should be maximum
|
||||
* visible at once (no further zooming out allowed). If this is e.g. set to
|
||||
* 10, no more than 10 values on the xPx-axis can be viewed at once without
|
||||
* 10, no more than 10 values on the x-axis can be viewed at once without
|
||||
* scrolling.
|
||||
*
|
||||
* @param maxXRange The maximum visible range of xPx-values.
|
||||
* @param maxXRange The maximum visible range of x-values.
|
||||
*/
|
||||
public void setVisibleXRangeMaximum(float maxXRange) {
|
||||
float xScale = mXAxis.mAxisRange / (maxXRange);
|
||||
|
@ -735,12 +735,12 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the size of the area (range on the xPx-axis) that should be minimum
|
||||
* Sets the size of the area (range on the x-axis) that should be minimum
|
||||
* visible at once (no further zooming in allowed). If this is e.g. set to
|
||||
* 10, no less than 10 values on the xPx-axis can be viewed at once without
|
||||
* 10, no less than 10 values on the x-axis can be viewed at once without
|
||||
* scrolling.
|
||||
*
|
||||
* @param minXRange The minimum visible range of xPx-values.
|
||||
* @param minXRange The minimum visible range of x-values.
|
||||
*/
|
||||
public void setVisibleXRangeMinimum(float minXRange) {
|
||||
float xScale = mXAxis.mAxisRange / (minXRange);
|
||||
|
@ -763,10 +763,10 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the size of the area (range on the yPx-axis) that should be maximum
|
||||
* Sets the size of the area (range on the y-axis) that should be maximum
|
||||
* visible at once.
|
||||
*
|
||||
* @param maxYRange the maximum visible range on the yPx-axis
|
||||
* @param maxYRange the maximum visible range on the y-axis
|
||||
* @param axis - the axis for which this limit should apply
|
||||
*/
|
||||
public void setVisibleYRangeMaximum(float maxYRange, AxisDependency axis) {
|
||||
|
@ -775,7 +775,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
}
|
||||
|
||||
/**
|
||||
* Moves the left side of the current viewport to the specified xPx-index.
|
||||
* Moves the left side of the current viewport to the specified x-index.
|
||||
* This also refreshes the chart by calling invalidate().
|
||||
*
|
||||
* @param xIndex
|
||||
|
@ -950,7 +950,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
/** CODE BELOW IS GETTERS AND SETTERS */
|
||||
|
||||
/**
|
||||
* Returns the delta-yPx yValue (yPx-yValue range) of the specified axis.
|
||||
* Returns the delta-y yValue (y-yValue range) of the specified axis.
|
||||
*
|
||||
* @param axis
|
||||
* @return
|
||||
|
@ -1132,7 +1132,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
|
||||
/**
|
||||
* Sets drawing the borders rectangle to true. If this is enabled, there is
|
||||
* no point drawing the axis-lines of xPx- and yPx-axis.
|
||||
* no point drawing the axis-lines of x- and y-axis.
|
||||
*
|
||||
* @param enabled
|
||||
*/
|
||||
|
@ -1187,7 +1187,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the Highlight object (contains xPx-index and DataSet index) of the
|
||||
* Returns the Highlight object (contains x-index and DataSet index) of the
|
||||
* selected yValue at the given touch point inside the Line-, Scatter-, or
|
||||
* CandleStick-Chart.
|
||||
*
|
||||
|
@ -1273,7 +1273,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the lowest xPx-index (yValue on the xPx-axis) that is still visible on
|
||||
* Returns the lowest x-index (yValue on the x-axis) that is still visible on
|
||||
* the chart.
|
||||
*
|
||||
* @return
|
||||
|
@ -1286,7 +1286,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the highest xPx-index (yValue on the xPx-axis) that is still visible
|
||||
* Returns the highest x-index (yValue on the x-axis) that is still visible
|
||||
* on the chart.
|
||||
*
|
||||
* @return
|
||||
|
@ -1308,7 +1308,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
}
|
||||
|
||||
/**
|
||||
* returns the current xPx-scale factor
|
||||
* returns the current x-scale factor
|
||||
*/
|
||||
public float getScaleX() {
|
||||
if (mViewPortHandler == null)
|
||||
|
@ -1318,7 +1318,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
}
|
||||
|
||||
/**
|
||||
* returns the current yPx-scale factor
|
||||
* returns the current y-scale factor
|
||||
*/
|
||||
public float getScaleY() {
|
||||
if (mViewPortHandler == null)
|
||||
|
@ -1337,7 +1337,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the left yPx-axis object. In the horizontal bar-chart, this is the
|
||||
* Returns the left y-axis object. In the horizontal bar-chart, this is the
|
||||
* top axis.
|
||||
*
|
||||
* @return
|
||||
|
@ -1347,7 +1347,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the right yPx-axis object. In the horizontal bar-chart, this is the
|
||||
* Returns the right y-axis object. In the horizontal bar-chart, this is the
|
||||
* bottom axis.
|
||||
*
|
||||
* @return
|
||||
|
@ -1357,7 +1357,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the yPx-axis object to the corresponding AxisDependency. In the
|
||||
* Returns the y-axis object to the corresponding AxisDependency. In the
|
||||
* horizontal bar-chart, LEFT == top, RIGHT == BOTTOM
|
||||
*
|
||||
* @param axis
|
||||
|
@ -1376,8 +1376,8 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
}
|
||||
|
||||
/**
|
||||
* If set to true, both xPx and yPx axis can be scaled simultaneously with 2 fingers, if false,
|
||||
* xPx and yPx axis can be scaled separately. default: false
|
||||
* 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
|
||||
*
|
||||
* @param enabled
|
||||
*/
|
||||
|
@ -1396,7 +1396,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
|
||||
/**
|
||||
* Set an offset in dp that allows the user to drag the chart over it's
|
||||
* bounds on the xPx-axis.
|
||||
* bounds on the x-axis.
|
||||
*
|
||||
* @param offset
|
||||
*/
|
||||
|
@ -1406,7 +1406,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
|
||||
/**
|
||||
* Set an offset in dp that allows the user to drag the chart over it's
|
||||
* bounds on the yPx-axis.
|
||||
* bounds on the y-axis.
|
||||
*
|
||||
* @param offset
|
||||
*/
|
||||
|
@ -1415,7 +1415,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if both drag offsets (xPx and yPx) are zero or smaller.
|
||||
* Returns true if both drag offsets (x and y) are zero or smaller.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -1486,11 +1486,11 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
}
|
||||
|
||||
/**
|
||||
* Flag that indicates if auto scaling on the yPx axis is enabled. This is
|
||||
* Flag that indicates if auto scaling on the y axis is enabled. This is
|
||||
* especially interesting for charts displaying financial data.
|
||||
*
|
||||
* @param enabled the yPx axis automatically adjusts to the min and max yPx
|
||||
* values of the current xPx axis range whenever the viewport
|
||||
* @param enabled the y axis automatically adjusts to the min and max y
|
||||
* values of the current x axis range whenever the viewport
|
||||
* changes
|
||||
*/
|
||||
public void setAutoScaleMinMaxEnabled(boolean enabled) {
|
||||
|
@ -1498,7 +1498,7 @@ public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<
|
|||
}
|
||||
|
||||
/**
|
||||
* @return true if auto scaling on the yPx axis is enabled.
|
||||
* @return true if auto scaling on the y axis is enabled.
|
||||
* @default false
|
||||
*/
|
||||
public boolean isAutoScaleMinMaxEnabled() {
|
||||
|
|
|
@ -118,7 +118,7 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
protected String mDescription = "Description";
|
||||
|
||||
/**
|
||||
* the object representing the labels on the xPx-axis
|
||||
* the object representing the labels on the x-axis
|
||||
*/
|
||||
protected XAxis mXAxis;
|
||||
|
||||
|
@ -335,7 +335,7 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
|
||||
/**
|
||||
* Removes all DataSets (and thereby Entries) from the chart. Does not
|
||||
* remove the xPx-values. Also refreshes the chart by calling invalidate().
|
||||
* remove the x-values. Also refreshes the chart by calling invalidate().
|
||||
*/
|
||||
public void clearValues() {
|
||||
mData.clearValues();
|
||||
|
@ -371,13 +371,13 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
|
||||
/**
|
||||
* calculates the offsets of the chart to the border depending on the
|
||||
* position of an eventual legend or depending on the length of the yPx-axis
|
||||
* and xPx-axis labels and their position
|
||||
* position of an eventual legend or depending on the length of the y-axis
|
||||
* and x-axis labels and their position
|
||||
*/
|
||||
protected abstract void calculateOffsets();
|
||||
|
||||
/**
|
||||
* calcualtes the yPx-min and yPx-max yValue and the yPx-delta and xPx-delta yValue
|
||||
* calcualtes the y-min and y-max yValue and the y-delta and x-delta yValue
|
||||
*/
|
||||
protected abstract void calcMinMax();
|
||||
|
||||
|
@ -570,8 +570,8 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
}
|
||||
|
||||
/**
|
||||
* Highlights the yValue at the given xPx-index in the given DataSet. Provide
|
||||
* -1 as the xPx-index or dataSetIndex to undo all highlighting.
|
||||
* Highlights the yValue at the given x-index in the given DataSet. Provide
|
||||
* -1 as the x-index or dataSetIndex to undo all highlighting.
|
||||
*
|
||||
* @param xIndex
|
||||
* @param dataSetIndex
|
||||
|
@ -748,7 +748,7 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
|
||||
/**
|
||||
* ################ ################ ################ ################
|
||||
* ANIMATIONS ONLY WORK FOR API LEVEL 11 (Android 3.0.xPx) AND HIGHER.
|
||||
* ANIMATIONS ONLY WORK FOR API LEVEL 11 (Android 3.0.x) AND HIGHER.
|
||||
*/
|
||||
/** CODE BELOW THIS RELATED TO ANIMATION */
|
||||
|
||||
|
@ -807,15 +807,15 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
|
||||
/**
|
||||
* ################ ################ ################ ################
|
||||
* ANIMATIONS ONLY WORK FOR API LEVEL 11 (Android 3.0.xPx) AND HIGHER.
|
||||
* ANIMATIONS ONLY WORK FOR API LEVEL 11 (Android 3.0.x) AND HIGHER.
|
||||
*/
|
||||
/** CODE BELOW FOR PROVIDING EASING FUNCTIONS */
|
||||
|
||||
/**
|
||||
* Animates the drawing / rendering of the chart on both xPx- and yPx-axis with
|
||||
* 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.xPx) AND HIGHER.
|
||||
* ONLY WORK FOR API LEVEL 11 (Android 3.0.x) AND HIGHER.
|
||||
*
|
||||
* @param durationMillisX
|
||||
* @param durationMillisY
|
||||
|
@ -828,10 +828,10 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
}
|
||||
|
||||
/**
|
||||
* Animates the rendering of the chart on the xPx-axis with the specified
|
||||
* 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.xPx) AND HIGHER.
|
||||
* API LEVEL 11 (Android 3.0.x) AND HIGHER.
|
||||
*
|
||||
* @param durationMillis
|
||||
* @param easing a custom easing function to be used on the animation phase
|
||||
|
@ -841,10 +841,10 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
}
|
||||
|
||||
/**
|
||||
* Animates the rendering of the chart on the yPx-axis with the specified
|
||||
* 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.xPx) AND HIGHER.
|
||||
* API LEVEL 11 (Android 3.0.x) AND HIGHER.
|
||||
*
|
||||
* @param durationMillis
|
||||
* @param easing a custom easing function to be used on the animation phase
|
||||
|
@ -855,15 +855,15 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
|
||||
/**
|
||||
* ################ ################ ################ ################
|
||||
* ANIMATIONS ONLY WORK FOR API LEVEL 11 (Android 3.0.xPx) AND HIGHER.
|
||||
* ANIMATIONS ONLY WORK FOR API LEVEL 11 (Android 3.0.x) AND HIGHER.
|
||||
*/
|
||||
/** CODE BELOW FOR PREDEFINED EASING OPTIONS */
|
||||
|
||||
/**
|
||||
* Animates the drawing / rendering of the chart on both xPx- and yPx-axis with
|
||||
* 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.xPx) AND HIGHER.
|
||||
* ONLY WORK FOR API LEVEL 11 (Android 3.0.x) AND HIGHER.
|
||||
*
|
||||
* @param durationMillisX
|
||||
* @param durationMillisY
|
||||
|
@ -876,10 +876,10 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
}
|
||||
|
||||
/**
|
||||
* Animates the rendering of the chart on the xPx-axis with the specified
|
||||
* 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.xPx) AND HIGHER.
|
||||
* API LEVEL 11 (Android 3.0.x) AND HIGHER.
|
||||
*
|
||||
* @param durationMillis
|
||||
* @param easing a predefined easing option
|
||||
|
@ -889,10 +889,10 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
}
|
||||
|
||||
/**
|
||||
* Animates the rendering of the chart on the yPx-axis with the specified
|
||||
* 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.xPx) AND HIGHER.
|
||||
* API LEVEL 11 (Android 3.0.x) AND HIGHER.
|
||||
*
|
||||
* @param durationMillis
|
||||
* @param easing a predefined easing option
|
||||
|
@ -903,15 +903,15 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
|
||||
/**
|
||||
* ################ ################ ################ ################
|
||||
* ANIMATIONS ONLY WORK FOR API LEVEL 11 (Android 3.0.xPx) AND HIGHER.
|
||||
* ANIMATIONS ONLY WORK FOR API LEVEL 11 (Android 3.0.x) AND HIGHER.
|
||||
*/
|
||||
/** CODE BELOW FOR ANIMATIONS WITHOUT EASING */
|
||||
|
||||
/**
|
||||
* Animates the rendering of the chart on the xPx-axis with the specified
|
||||
* 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.xPx) AND HIGHER.
|
||||
* API LEVEL 11 (Android 3.0.x) AND HIGHER.
|
||||
*
|
||||
* @param durationMillis
|
||||
*/
|
||||
|
@ -920,10 +920,10 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
}
|
||||
|
||||
/**
|
||||
* Animates the rendering of the chart on the yPx-axis with the specified
|
||||
* 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.xPx) AND HIGHER.
|
||||
* API LEVEL 11 (Android 3.0.x) AND HIGHER.
|
||||
*
|
||||
* @param durationMillis
|
||||
*/
|
||||
|
@ -932,10 +932,10 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
}
|
||||
|
||||
/**
|
||||
* Animates the drawing / rendering of the chart on both xPx- and yPx-axis with
|
||||
* 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.xPx) AND HIGHER.
|
||||
* ONLY WORK FOR API LEVEL 11 (Android 3.0.x) AND HIGHER.
|
||||
*
|
||||
* @param durationMillisX
|
||||
* @param durationMillisY
|
||||
|
@ -951,7 +951,7 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
|
||||
|
||||
/**
|
||||
* Returns the object representing all xPx-labels, this method can be used to
|
||||
* 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.)
|
||||
*
|
||||
|
@ -1000,7 +1000,7 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
}
|
||||
|
||||
/**
|
||||
* returns the current yPx-max yValue across all DataSets
|
||||
* returns the current y-max yValue across all DataSets
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -1009,7 +1009,7 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
}
|
||||
|
||||
/**
|
||||
* returns the current yPx-min yValue across all DataSets
|
||||
* returns the current y-min yValue across all DataSets
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -1033,7 +1033,7 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the total number of (yPx) values the chart holds (across all DataSets).
|
||||
* Returns the total number of (y) values the chart holds (across all DataSets).
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,7 @@ import com.github.mikephil.charting.utils.TransformerHorizontalBarChart;
|
|||
import com.github.mikephil.charting.utils.Utils;
|
||||
|
||||
/**
|
||||
* BarChart with horizontal bar orientation. In this implementation, xPx- and yPx-axis are switched, meaning the YAxis class
|
||||
* BarChart with horizontal bar orientation. In this implementation, x- and y-axis are switched, meaning the YAxis class
|
||||
* represents the horizontal values and the XAxis class represents the vertical values.
|
||||
*
|
||||
* @author Philipp Jahoda
|
||||
|
@ -70,7 +70,7 @@ public class HorizontalBarChart extends BarChart {
|
|||
offsetRight += mOffsetsBuffer.right;
|
||||
offsetBottom += mOffsetsBuffer.bottom;
|
||||
|
||||
// offsets for yPx-labels
|
||||
// offsets for y-labels
|
||||
if (mAxisLeft.needsOffset()) {
|
||||
offsetTop += mAxisLeft.getRequiredHeightSpace(mAxisRendererLeft.getPaintAxisLabels());
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ public class HorizontalBarChart extends BarChart {
|
|||
|
||||
if (mXAxis.isEnabled()) {
|
||||
|
||||
// offsets for xPx-labels
|
||||
// offsets for x-labels
|
||||
if (mXAxis.getPosition() == XAxisPosition.BOTTOM) {
|
||||
|
||||
offsetLeft += xlabelwidth;
|
||||
|
@ -170,7 +170,7 @@ public class HorizontalBarChart extends BarChart {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the Highlight object (contains xPx-index and DataSet index) of the selected yValue at the given touch point
|
||||
* Returns the Highlight object (contains x-index and DataSet index) of the selected yValue at the given touch point
|
||||
* inside the BarChart.
|
||||
*
|
||||
* @param x
|
||||
|
@ -185,7 +185,7 @@ public class HorizontalBarChart extends BarChart {
|
|||
Log.e(LOG_TAG, "Can't select by touch. No data set.");
|
||||
return null;
|
||||
} else
|
||||
return getHighlighter().getHighlight(y, x); // switch xPx and yPx
|
||||
return getHighlighter().getHighlight(y, x); // switch x and y
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -203,7 +203,7 @@ public class HorizontalBarChart extends BarChart {
|
|||
}
|
||||
|
||||
// /**
|
||||
// * Returns the lowest xPx-index (yValue on the xPx-axis) that is still visible on the chart.
|
||||
// * Returns the lowest x-index (yValue on the x-axis) that is still visible on the chart.
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
|
@ -220,7 +220,7 @@ public class HorizontalBarChart extends BarChart {
|
|||
// }
|
||||
//
|
||||
// /**
|
||||
// * Returns the highest xPx-index (yValue on the xPx-axis) that is still visible on the chart.
|
||||
// * Returns the highest x-index (yValue on the x-axis) that is still visible on the chart.
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
|
|
|
@ -34,7 +34,7 @@ public class PieChart extends PieRadarChartBase<PieData> {
|
|||
private RectF mCircleBox = new RectF();
|
||||
|
||||
/**
|
||||
* flag indicating if the xPx-labels should be drawn or not
|
||||
* flag indicating if the x-labels should be drawn or not
|
||||
*/
|
||||
private boolean mDrawXLabels = true;
|
||||
|
||||
|
@ -302,7 +302,7 @@ public class PieChart extends PieRadarChartBase<PieData> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the index of the DataSet this xPx-index belongs to.
|
||||
* Returns the index of the DataSet this x-index belongs to.
|
||||
*
|
||||
* @param xIndex
|
||||
* @return
|
||||
|
@ -559,7 +559,7 @@ public class PieChart extends PieRadarChartBase<PieData> {
|
|||
}
|
||||
|
||||
/**
|
||||
* set this to true to draw the xPx-yValue text into the pie slices
|
||||
* set this to true to draw the x-yValue text into the pie slices
|
||||
*
|
||||
* @param enabled
|
||||
*/
|
||||
|
@ -568,7 +568,7 @@ public class PieChart extends PieRadarChartBase<PieData> {
|
|||
}
|
||||
|
||||
/**
|
||||
* returns true if drawing xPx-values is enabled, false if not
|
||||
* returns true if drawing x-values is enabled, false if not
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -441,7 +441,7 @@ public abstract class PieRadarChartBase<T extends ChartData<? extends IDataSet<?
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns an array of SelectionDetail objects for the given xPx-index. The SelectionDetail
|
||||
* Returns an array of SelectionDetail objects for the given x-index. The SelectionDetail
|
||||
* objects give information about the yValue at the selected index and the
|
||||
* DataSet it belongs to. INFORMATION: This method does calculations at
|
||||
* runtime. Do not over-use in performance critical situations.
|
||||
|
@ -456,7 +456,7 @@ public abstract class PieRadarChartBase<T extends ChartData<? extends IDataSet<?
|
|||
|
||||
IDataSet<?> dataSet = mData.getDataSetByIndex(i);
|
||||
|
||||
// extract all yPx-values from all DataSets at the given xPx-index
|
||||
// extract all y-values from all DataSets at the given x-index
|
||||
final float yVal = dataSet.getYValueForXValue(xIndex);
|
||||
if (Float.isNaN(yVal))
|
||||
continue;
|
||||
|
|
|
@ -62,7 +62,7 @@ public class RadarChart extends PieRadarChartBase<RadarData> {
|
|||
private int mSkipWebLineCount = 0;
|
||||
|
||||
/**
|
||||
* the object reprsenting the yPx-axis labels
|
||||
* the object reprsenting the y-axis labels
|
||||
*/
|
||||
private YAxis mYAxis;
|
||||
|
||||
|
@ -99,7 +99,7 @@ public class RadarChart extends PieRadarChartBase<RadarData> {
|
|||
protected void calcMinMax() {
|
||||
super.calcMinMax();
|
||||
|
||||
// calculate / set xPx-axis range
|
||||
// calculate / set x-axis range
|
||||
// mXAxis.mAxisMaximum = mData.getXVals().size() - 1;
|
||||
// mXAxis.mAxisRange = Math.abs(mXAxis.mAxisMaximum - mXAxis.mAxisMinimum);
|
||||
|
||||
|
@ -214,7 +214,7 @@ public class RadarChart extends PieRadarChartBase<RadarData> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the object that represents all yPx-labels of the RadarChart.
|
||||
* Returns the object that represents all y-labels of the RadarChart.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -347,21 +347,21 @@ public class RadarChart extends PieRadarChartBase<RadarData> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the maximum yValue this chart can display on it's yPx-axis.
|
||||
* Returns the maximum yValue this chart can display on it's y-axis.
|
||||
*/
|
||||
public float getYChartMax() {
|
||||
return mYAxis.mAxisMaximum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the minimum yValue this chart can display on it's yPx-axis.
|
||||
* Returns the minimum yValue this chart can display on it's y-axis.
|
||||
*/
|
||||
public float getYChartMin() {
|
||||
return mYAxis.mAxisMinimum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the range of yPx-values this chart can display.
|
||||
* Returns the range of y-values this chart can display.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -71,7 +71,7 @@ public abstract class AxisBase extends ComponentBase {
|
|||
protected boolean mGranularityEnabled = false;
|
||||
|
||||
/**
|
||||
* if true, the set number of yPx-labels will be forced
|
||||
* if true, the set number of y-labels will be forced
|
||||
*/
|
||||
protected boolean mForceLabels = false;
|
||||
|
||||
|
@ -282,10 +282,10 @@ public abstract class AxisBase extends ComponentBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the number of label entries for the yPx-axis max = 25, min = 2, default: 6, be aware
|
||||
* Sets the number of label entries for the y-axis max = 25, min = 2, default: 6, be aware
|
||||
* that this number is not fixed.
|
||||
*
|
||||
* @param count the number of yPx-axis labels that sould be displayed
|
||||
* @param count the number of y-axis labels that sould be displayed
|
||||
*/
|
||||
public void setLabelCount(int count) {
|
||||
|
||||
|
@ -299,11 +299,11 @@ public abstract class AxisBase extends ComponentBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* sets the number of label entries for the yPx-axis max = 25, min = 2, default: 6, be aware
|
||||
* sets the number of label entries for the y-axis max = 25, min = 2, default: 6, be aware
|
||||
* that this number is not
|
||||
* fixed (if force == false) and can only be approximated.
|
||||
*
|
||||
* @param count the number of yPx-axis labels that sould be displayed
|
||||
* @param count the number of y-axis labels that sould be displayed
|
||||
* @param force if enabled, the set label count will be forced, meaning that the exact
|
||||
* specified count of labels will
|
||||
* be drawn and evenly distributed alongside the axis - this might cause labels
|
||||
|
@ -316,7 +316,7 @@ public abstract class AxisBase extends ComponentBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if focing the yPx-label count is enabled. Default: false
|
||||
* Returns true if focing the y-label count is enabled. Default: false
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -325,7 +325,7 @@ public abstract class AxisBase extends ComponentBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the number of label entries the yPx-axis should have
|
||||
* Returns the number of label entries the y-axis should have
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -19,7 +19,7 @@ public abstract class ComponentBase {
|
|||
protected boolean mEnabled = true;
|
||||
|
||||
/**
|
||||
* the offset in pixels this axis labels have on the xPx-axis
|
||||
* the offset in pixels this axis labels have on the x-axis
|
||||
*/
|
||||
protected float mXOffset = 5f;
|
||||
|
||||
|
@ -48,7 +48,7 @@ public abstract class ComponentBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the used offset on the xPx-axis for drawing the axis or legend
|
||||
* Returns the used offset on the x-axis for drawing the axis or legend
|
||||
* labels. This offset is applied before and after the label.
|
||||
*
|
||||
* @return
|
||||
|
@ -58,7 +58,7 @@ public abstract class ComponentBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the used xPx-axis offset for the labels on this axis.
|
||||
* Sets the used x-axis offset for the labels on this axis.
|
||||
*
|
||||
* @param xOffset
|
||||
*/
|
||||
|
@ -67,7 +67,7 @@ public abstract class ComponentBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the used offset on the xPx-axis for drawing the axis labels. This
|
||||
* Returns the used offset on the x-axis for drawing the axis labels. This
|
||||
* offset is applied before and after the label.
|
||||
*
|
||||
* @return
|
||||
|
@ -77,7 +77,7 @@ public abstract class ComponentBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the used yPx-axis offset for the labels on this axis. For the legend,
|
||||
* Sets the used y-axis offset for the labels on this axis. For the legend,
|
||||
* higher offset means the legend as a whole will be placed further away
|
||||
* from the top.
|
||||
*
|
||||
|
|
|
@ -11,13 +11,13 @@ import com.github.mikephil.charting.utils.Utils;
|
|||
/**
|
||||
* The limit line is an additional feature for all Line-, Bar- and
|
||||
* ScatterCharts. It allows the displaying of an additional line in the chart
|
||||
* that marks a certain maximum / limit on the specified axis (xPx- or yPx-axis).
|
||||
* that marks a certain maximum / limit on the specified axis (x- or y-axis).
|
||||
*
|
||||
* @author Philipp Jahoda
|
||||
*/
|
||||
public class LimitLine extends ComponentBase {
|
||||
|
||||
/** limit / maximum (the yPx-yValue or xIndex) */
|
||||
/** limit / maximum (the y-yValue or xIndex) */
|
||||
private float mLimit = 0f;
|
||||
|
||||
/** the width of the limit line */
|
||||
|
@ -46,7 +46,7 @@ public class LimitLine extends ComponentBase {
|
|||
/**
|
||||
* Constructor with limit.
|
||||
*
|
||||
* @param limit - the position (the yValue) on the yPx-axis (yPx-yValue) or xPx-axis
|
||||
* @param limit - the position (the yValue) on the y-axis (y-yValue) or x-axis
|
||||
* (xIndex) where this line should appear
|
||||
*/
|
||||
public LimitLine(float limit) {
|
||||
|
@ -56,7 +56,7 @@ public class LimitLine extends ComponentBase {
|
|||
/**
|
||||
* Constructor with limit and label.
|
||||
*
|
||||
* @param limit - the position (the yValue) on the yPx-axis (yPx-yValue) or xPx-axis
|
||||
* @param limit - the position (the yValue) on the y-axis (y-yValue) or x-axis
|
||||
* (xIndex) where this line should appear
|
||||
* @param label - provide "" if no label is required
|
||||
*/
|
||||
|
|
|
@ -74,19 +74,19 @@ public abstract class MarkerView extends RelativeLayout {
|
|||
public abstract void refreshContent(Entry e, Highlight highlight);
|
||||
|
||||
/**
|
||||
* Use this to return the desired offset you wish the MarkerView to have on the xPx-axis. By returning -(getWidth() /
|
||||
* Use this to return the desired offset you wish the MarkerView to have on the x-axis. By returning -(getWidth() /
|
||||
* 2) you will center the MarkerView horizontally.
|
||||
*
|
||||
* @param xpos the position on the xPx-axis in pixels where the marker is drawn
|
||||
* @param xpos the position on the x-axis in pixels where the marker is drawn
|
||||
* @return
|
||||
*/
|
||||
public abstract int getXOffset(float xpos);
|
||||
|
||||
/**
|
||||
* Use this to return the desired position offset you wish the MarkerView to have on the yPx-axis. By returning
|
||||
* Use this to return the desired position offset you wish the MarkerView to have on the y-axis. By returning
|
||||
* -getHeight() you will cause the MarkerView to be above the selected yValue.
|
||||
*
|
||||
* @param ypos the position on the yPx-axis in pixels where the marker is drawn
|
||||
* @param ypos the position on the y-axis in pixels where the marker is drawn
|
||||
* @return
|
||||
*/
|
||||
public abstract int getYOffset(float ypos);
|
||||
|
|
|
@ -4,7 +4,7 @@ package com.github.mikephil.charting.components;
|
|||
import com.github.mikephil.charting.utils.Utils;
|
||||
|
||||
/**
|
||||
* Class representing the xPx-axis labels settings. Only use the setter methods to
|
||||
* Class representing the x-axis labels settings. Only use the setter methods to
|
||||
* modify it. Do not access public variables directly. Be aware that not all
|
||||
* features the XLabels class provides are suitable for the RadarChart.
|
||||
*
|
||||
|
@ -13,25 +13,25 @@ import com.github.mikephil.charting.utils.Utils;
|
|||
public class XAxis extends AxisBase {
|
||||
|
||||
/**
|
||||
* width of the xPx-axis labels in pixels - this is automatically
|
||||
* width of the x-axis labels in pixels - this is automatically
|
||||
* calculated by the computeSize() methods in the renderers
|
||||
*/
|
||||
public int mLabelWidth = 1;
|
||||
|
||||
/**
|
||||
* height of the xPx-axis labels in pixels - this is automatically
|
||||
* height of the x-axis labels in pixels - this is automatically
|
||||
* calculated by the computeSize() methods in the renderers
|
||||
*/
|
||||
public int mLabelHeight = 1;
|
||||
|
||||
/**
|
||||
* width of the (rotated) xPx-axis labels in pixels - this is automatically
|
||||
* width of the (rotated) x-axis labels in pixels - this is automatically
|
||||
* calculated by the computeSize() methods in the renderers
|
||||
*/
|
||||
public int mLabelRotatedWidth = 1;
|
||||
|
||||
/**
|
||||
* height of the (rotated) xPx-axis labels in pixels - this is automatically
|
||||
* height of the (rotated) x-axis labels in pixels - this is automatically
|
||||
* calculated by the computeSize() methods in the renderers
|
||||
*/
|
||||
public int mLabelRotatedHeight = 1;
|
||||
|
@ -48,12 +48,12 @@ public class XAxis extends AxisBase {
|
|||
private boolean mAvoidFirstLastClipping = false;
|
||||
|
||||
/**
|
||||
* the position of the xPx-labels relative to the chart
|
||||
* the position of the x-labels relative to the chart
|
||||
*/
|
||||
private XAxisPosition mPosition = XAxisPosition.TOP;
|
||||
|
||||
/**
|
||||
* enum for the position of the xPx-labels relative to the chart
|
||||
* enum for the position of the x-labels relative to the chart
|
||||
*/
|
||||
public enum XAxisPosition {
|
||||
TOP, BOTTOM, BOTH_SIDED, TOP_INSIDE, BOTTOM_INSIDE
|
||||
|
@ -66,14 +66,14 @@ public class XAxis extends AxisBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* returns the position of the xPx-labels
|
||||
* returns the position of the x-labels
|
||||
*/
|
||||
public XAxisPosition getPosition() {
|
||||
return mPosition;
|
||||
}
|
||||
|
||||
/**
|
||||
* sets the position of the xPx-labels
|
||||
* sets the position of the x-labels
|
||||
*
|
||||
* @param pos
|
||||
*/
|
||||
|
|
|
@ -6,7 +6,7 @@ import android.graphics.Paint;
|
|||
import com.github.mikephil.charting.utils.Utils;
|
||||
|
||||
/**
|
||||
* Class representing the yPx-axis labels settings and its entries. Only use the setter methods to
|
||||
* Class representing the y-axis labels settings and its entries. Only use the setter methods to
|
||||
* modify it. Do not
|
||||
* access public variables directly. Be aware that not all features the YLabels class provides
|
||||
* are suitable for the
|
||||
|
@ -19,7 +19,7 @@ import com.github.mikephil.charting.utils.Utils;
|
|||
public class YAxis extends AxisBase {
|
||||
|
||||
/**
|
||||
* indicates if the top yPx-label entry is drawn or not
|
||||
* indicates if the top y-label entry is drawn or not
|
||||
*/
|
||||
private boolean mDrawTopYLabelEntry = true;
|
||||
|
||||
|
@ -54,12 +54,12 @@ public class YAxis extends AxisBase {
|
|||
protected float mSpacePercentBottom = 10f;
|
||||
|
||||
/**
|
||||
* the position of the yPx-labels relative to the chart
|
||||
* the position of the y-labels relative to the chart
|
||||
*/
|
||||
private YAxisLabelPosition mPosition = YAxisLabelPosition.OUTSIDE_CHART;
|
||||
|
||||
/**
|
||||
* enum for the position of the yPx-labels relative to the chart
|
||||
* enum for the position of the y-labels relative to the chart
|
||||
*/
|
||||
public enum YAxisLabelPosition {
|
||||
OUTSIDE_CHART, INSIDE_CHART
|
||||
|
@ -144,14 +144,14 @@ public class YAxis extends AxisBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* returns the position of the yPx-labels
|
||||
* returns the position of the y-labels
|
||||
*/
|
||||
public YAxisLabelPosition getLabelPosition() {
|
||||
return mPosition;
|
||||
}
|
||||
|
||||
/**
|
||||
* sets the position of the yPx-labels
|
||||
* sets the position of the y-labels
|
||||
*
|
||||
* @param pos
|
||||
*/
|
||||
|
@ -160,7 +160,7 @@ public class YAxis extends AxisBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* returns true if drawing the top yPx-axis label entry is enabled
|
||||
* returns true if drawing the top y-axis label entry is enabled
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -169,9 +169,9 @@ public class YAxis extends AxisBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* set this to true to enable drawing the top yPx-label entry. Disabling this can be helpful
|
||||
* when the top yPx-label and
|
||||
* left xPx-label interfere with each other. default: true
|
||||
* set this to true to enable drawing the top y-label entry. Disabling this can be helpful
|
||||
* when the top y-label and
|
||||
* left x-label interfere with each other. default: true
|
||||
*
|
||||
* @param enabled
|
||||
*/
|
||||
|
@ -180,7 +180,7 @@ public class YAxis extends AxisBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* If this is set to true, the yPx-axis is inverted which means that low values are on top of
|
||||
* If this is set to true, the y-axis is inverted which means that low values are on top of
|
||||
* the chart, high values
|
||||
* on bottom.
|
||||
*
|
||||
|
@ -191,7 +191,7 @@ public class YAxis extends AxisBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* If this returns true, the yPx-axis is inverted.
|
||||
* If this returns true, the y-axis is inverted.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -57,7 +57,7 @@ public abstract class BaseDataSet<T extends Entry> implements IDataSet<T> {
|
|||
protected Typeface mValueTypeface;
|
||||
|
||||
/**
|
||||
* if true, yPx-values are drawn on the chart
|
||||
* if true, y-values are drawn on the chart
|
||||
*/
|
||||
protected boolean mDrawValues = true;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ public abstract class BaseEntry {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the yPx yValue of this Entry.
|
||||
* Returns the y yValue of this Entry.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -34,7 +34,7 @@ public abstract class BaseEntry {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the yPx-yValue for the Entry.
|
||||
* Sets the y-yValue for the Entry.
|
||||
*
|
||||
* @param y
|
||||
*/
|
||||
|
|
|
@ -19,8 +19,8 @@ public class BubbleEntry extends Entry {
|
|||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param x The yValue on the xPx-axis.
|
||||
* @param y The yValue on the yPx-axis.
|
||||
* @param x The yValue on the x-axis.
|
||||
* @param y The yValue on the y-axis.
|
||||
* @param size The size of the bubble.
|
||||
*/
|
||||
public BubbleEntry(float x, float y, float size) {
|
||||
|
@ -31,8 +31,8 @@ public class BubbleEntry extends Entry {
|
|||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param x The yValue on the xPx-axis.
|
||||
* @param y The yValue on the yPx-axis.
|
||||
* @param x The yValue on the x-axis.
|
||||
* @param y The yValue on the y-axis.
|
||||
* @param size The size of the bubble.
|
||||
* @param data Spot for additional data this Entry represents.
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,7 @@ public class CandleEntry extends Entry {
|
|||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param x The yValue on the xPx-axis.
|
||||
* @param x The yValue on the x-axis.
|
||||
* @param shadowH The (shadow) high yValue.
|
||||
* @param shadowL The (shadow) low yValue.
|
||||
* @param open The open yValue.
|
||||
|
@ -44,7 +44,7 @@ public class CandleEntry extends Entry {
|
|||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param x The yValue on the xPx-axis.
|
||||
* @param x The yValue on the x-axis.
|
||||
* @param shadowH The (shadow) high yValue.
|
||||
* @param shadowL The (shadow) low yValue.
|
||||
* @param open
|
||||
|
|
|
@ -16,29 +16,29 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* Class that holds all relevant data that represents the chart. That involves
|
||||
* at least one (or more) DataSets, and an array of xPx-values.
|
||||
* at least one (or more) DataSets, and an array of x-values.
|
||||
*
|
||||
* @author Philipp Jahoda
|
||||
*/
|
||||
public abstract class ChartData<T extends IDataSet<? extends Entry>> {
|
||||
|
||||
/**
|
||||
* maximum yPx-yValue in the yValue array across all axes
|
||||
* maximum y-yValue in the yValue array across all axes
|
||||
*/
|
||||
protected float mYMax = 0.0f;
|
||||
|
||||
/**
|
||||
* the minimum yPx-yValue in the yValue array across all axes
|
||||
* the minimum y-yValue in the yValue array across all axes
|
||||
*/
|
||||
protected float mYMin = 0.0f;
|
||||
|
||||
/**
|
||||
* maximum xPx-yValue in the yValue array
|
||||
* maximum x-yValue in the yValue array
|
||||
*/
|
||||
protected float mXMax = 0f;
|
||||
|
||||
/**
|
||||
* minimum xPx-yValue in the yValue array
|
||||
* minimum x-yValue in the yValue array
|
||||
*/
|
||||
protected float mXMin = 0f;
|
||||
|
||||
|
@ -51,12 +51,12 @@ public abstract class ChartData<T extends IDataSet<? extends Entry>> {
|
|||
protected float mRightAxisMin = 0.0f;
|
||||
|
||||
/**
|
||||
* total number of yPx-values across all DataSet objects
|
||||
* total number of y-values across all DataSet objects
|
||||
*/
|
||||
private int mYValCount = 0;
|
||||
|
||||
/**
|
||||
* contains the maximum length (in characters) an entry in the xPx-vals array
|
||||
* contains the maximum length (in characters) an entry in the x-vals array
|
||||
* has
|
||||
*/
|
||||
private float mXValMaximumLength = 0;
|
||||
|
@ -105,7 +105,7 @@ public abstract class ChartData<T extends IDataSet<? extends Entry>> {
|
|||
}
|
||||
|
||||
/**
|
||||
* calc minimum and maximum values (both xPx and yPx) over all DataSets
|
||||
* calc minimum and maximum values (both x and y) over all DataSets
|
||||
*/
|
||||
public void calcMinMax() {
|
||||
|
||||
|
@ -192,7 +192,7 @@ public abstract class ChartData<T extends IDataSet<? extends Entry>> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Calculates the total number of yPx-values across all DataSets the ChartData
|
||||
* Calculates the total number of y-values across all DataSets the ChartData
|
||||
* represents.
|
||||
*
|
||||
* @return
|
||||
|
@ -227,7 +227,7 @@ public abstract class ChartData<T extends IDataSet<? extends Entry>> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the smallest yPx-yValue the data object contains.
|
||||
* Returns the smallest y-yValue the data object contains.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -236,7 +236,7 @@ public abstract class ChartData<T extends IDataSet<? extends Entry>> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the minimum yPx-yValue for the specified axis.
|
||||
* Returns the minimum y-yValue for the specified axis.
|
||||
*
|
||||
* @param axis
|
||||
* @return
|
||||
|
@ -249,7 +249,7 @@ public abstract class ChartData<T extends IDataSet<? extends Entry>> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the greatest yPx-yValue the data object contains.
|
||||
* Returns the greatest y-yValue the data object contains.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -258,7 +258,7 @@ public abstract class ChartData<T extends IDataSet<? extends Entry>> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the maximum yPx-yValue for the specified axis.
|
||||
* Returns the maximum y-yValue for the specified axis.
|
||||
*
|
||||
* @param axis
|
||||
* @return
|
||||
|
@ -271,7 +271,7 @@ public abstract class ChartData<T extends IDataSet<? extends Entry>> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the minimum xPx-yValue this data object contains.
|
||||
* Returns the minimum x-yValue this data object contains.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -280,7 +280,7 @@ public abstract class ChartData<T extends IDataSet<? extends Entry>> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the maximum xPx-yValue this data object contains.
|
||||
* Returns the maximum x-yValue this data object contains.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -290,7 +290,7 @@ public abstract class ChartData<T extends IDataSet<? extends Entry>> {
|
|||
|
||||
/**
|
||||
* returns the maximum length (in characters) across all values in the
|
||||
* xPx-vals array
|
||||
* x-vals array
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -299,7 +299,7 @@ public abstract class ChartData<T extends IDataSet<? extends Entry>> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the total number of yPx-values across all DataSet objects the this
|
||||
* Returns the total number of y-values across all DataSet objects the this
|
||||
* object represents.
|
||||
*
|
||||
* @return
|
||||
|
@ -733,7 +733,7 @@ public abstract class ChartData<T extends IDataSet<? extends Entry>> {
|
|||
}
|
||||
|
||||
// /**
|
||||
// * Generates an xPx-values array filled with numbers in range specified by the
|
||||
// * Generates an x-values array filled with numbers in range specified by the
|
||||
// * parameters. Can be used for convenience.
|
||||
// *
|
||||
// * @return
|
||||
|
|
|
@ -20,22 +20,22 @@ public abstract class DataSet<T extends Entry> extends BaseDataSet<T> {
|
|||
protected List<T> mValues = null;
|
||||
|
||||
/**
|
||||
* maximum yPx-yValue in the yValue array
|
||||
* maximum y-yValue in the yValue array
|
||||
*/
|
||||
protected float mYMax = 0.0f;
|
||||
|
||||
/**
|
||||
* minimum yPx-yValue in the yValue array
|
||||
* minimum y-yValue in the yValue array
|
||||
*/
|
||||
protected float mYMin = 0.0f;
|
||||
|
||||
/**
|
||||
* maximum xPx-yValue in the yValue array
|
||||
* maximum x-yValue in the yValue array
|
||||
*/
|
||||
protected float mXMax = 0.0f;
|
||||
|
||||
/**
|
||||
* minimum xPx-yValue in the yValue array
|
||||
* minimum x-yValue in the yValue array
|
||||
*/
|
||||
protected float mXMin = 0.0f;
|
||||
|
||||
|
@ -108,7 +108,7 @@ public abstract class DataSet<T extends Entry> extends BaseDataSet<T> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the array of yPx-values that this DataSet represents.
|
||||
* Returns the array of y-values that this DataSet represents.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -117,7 +117,7 @@ public abstract class DataSet<T extends Entry> extends BaseDataSet<T> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the array of yPx-values that this DataSet represents, and calls notifyDataSetChanged()
|
||||
* Sets the array of y-values that this DataSet represents, and calls notifyDataSetChanged()
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -396,7 +396,7 @@ public abstract class DataSet<T extends Entry> extends BaseDataSet<T> {
|
|||
/**
|
||||
* Determines how to round DataSet index values for
|
||||
* {@link DataSet#getEntryIndex(float, Rounding)} DataSet.getEntryIndex()}
|
||||
* when an exact xPx-index is not found.
|
||||
* when an exact x-index is not found.
|
||||
*/
|
||||
public enum Rounding {
|
||||
UP,
|
||||
|
|
|
@ -23,8 +23,8 @@ public class Entry extends BaseEntry implements Parcelable {
|
|||
/**
|
||||
* A Entry represents one single entry in the chart.
|
||||
*
|
||||
* @param x the xPx yValue
|
||||
* @param y the yPx yValue (the actual yValue of the entry)
|
||||
* @param x the x yValue
|
||||
* @param y the y yValue (the actual yValue of the entry)
|
||||
*/
|
||||
public Entry(float x, float y) {
|
||||
super(y);
|
||||
|
@ -34,8 +34,8 @@ public class Entry extends BaseEntry implements Parcelable {
|
|||
/**
|
||||
* A Entry represents one single entry in the chart.
|
||||
*
|
||||
* @param x the xPx yValue
|
||||
* @param y the yPx yValue (the actual yValue of the entry)
|
||||
* @param x the x yValue
|
||||
* @param y the y yValue (the actual yValue of the entry)
|
||||
* @param data Spot for additional data this Entry represents.
|
||||
*/
|
||||
public Entry(float x, float y, Object data) {
|
||||
|
@ -44,7 +44,7 @@ public class Entry extends BaseEntry implements Parcelable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the xPx-yValue of this Entry object.
|
||||
* Returns the x-yValue of this Entry object.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -53,7 +53,7 @@ public class Entry extends BaseEntry implements Parcelable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the xPx-yValue of this Entry object.
|
||||
* Sets the x-yValue of this Entry object.
|
||||
*
|
||||
* @param x
|
||||
*/
|
||||
|
@ -97,7 +97,7 @@ public class Entry extends BaseEntry implements Parcelable {
|
|||
}
|
||||
|
||||
/**
|
||||
* returns a string representation of the entry containing xPx-index and yValue
|
||||
* returns a string representation of the entry containing x-index and yValue
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* A PieData object can only represent one DataSet. Unlike all other charts, the
|
||||
* legend labels of the PieChart are created from the xPx-values array, and not
|
||||
* legend labels of the PieChart are created from the x-values array, and not
|
||||
* from the DataSet labels. Each PieData object can only represent one
|
||||
* PieDataSet (multiple PieDataSets inside a single PieChart are not possible).
|
||||
*
|
||||
|
|
|
@ -81,7 +81,7 @@ public class Approximator {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the ratios for xPx- and yPx-axis, as well as the ratio of the scale
|
||||
* Sets the ratios for x- and y-axis, as well as the ratio of the scale
|
||||
* levels
|
||||
*
|
||||
* @param deltaRatio
|
||||
|
@ -163,7 +163,7 @@ public class Approximator {
|
|||
* epsilon (tolerance)
|
||||
*
|
||||
* @param entries
|
||||
* @param epsilon as yPx-yValue
|
||||
* @param epsilon as y-yValue
|
||||
* @param start
|
||||
* @param end
|
||||
*/
|
||||
|
|
|
@ -28,22 +28,22 @@ public abstract class RealmBaseDataSet<T extends RealmObject, S extends Entry> e
|
|||
protected List<S> mValues;
|
||||
|
||||
/**
|
||||
* maximum yPx-yValue in the yPx-yValue array
|
||||
* maximum y-yValue in the y-yValue array
|
||||
*/
|
||||
protected float mYMax = 0.0f;
|
||||
|
||||
/**
|
||||
* the minimum yPx-yValue in the yPx-yValue array
|
||||
* the minimum y-yValue in the y-yValue array
|
||||
*/
|
||||
protected float mYMin = 0.0f;
|
||||
|
||||
/**
|
||||
* maximum xPx-yValue in the yValue array
|
||||
* maximum x-yValue in the yValue array
|
||||
*/
|
||||
protected float mXMax = 0.0f;
|
||||
|
||||
/**
|
||||
* minimum xPx-yValue in the yValue array
|
||||
* minimum x-yValue in the yValue array
|
||||
*/
|
||||
protected float mXMin = 0.0f;
|
||||
|
||||
|
@ -384,7 +384,7 @@ public abstract class RealmBaseDataSet<T extends RealmObject, S extends Entry> e
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the fieldname that represents the "yPx-values" in the realm-data.
|
||||
* Returns the fieldname that represents the "y-values" in the realm-data.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -393,7 +393,7 @@ public abstract class RealmBaseDataSet<T extends RealmObject, S extends Entry> e
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the field name that is used for getting the yPx-values out of the RealmResultSet.
|
||||
* Sets the field name that is used for getting the y-values out of the RealmResultSet.
|
||||
*
|
||||
* @param yValuesField
|
||||
*/
|
||||
|
@ -402,7 +402,7 @@ public abstract class RealmBaseDataSet<T extends RealmObject, S extends Entry> e
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the fieldname that represents the "xPx-values" in the realm-data.
|
||||
* Returns the fieldname that represents the "x-values" in the realm-data.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -411,7 +411,7 @@ public abstract class RealmBaseDataSet<T extends RealmObject, S extends Entry> e
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the field name that is used for getting the xPx-values out of the RealmResultSet.
|
||||
* Sets the field name that is used for getting the x-values out of the RealmResultSet.
|
||||
*
|
||||
* @param xValuesField
|
||||
*/
|
||||
|
|
|
@ -25,7 +25,7 @@ public class RealmBubbleDataSet<T extends RealmObject> extends RealmBarLineScatt
|
|||
* Constructor for creating a CandleDataSet with realm data.
|
||||
*
|
||||
* @param result the queried results from the realm database
|
||||
* @param yValuesField the name of the field in your data object that represents the yPx-yValue
|
||||
* @param yValuesField the name of the field in your data object that represents the y-yValue
|
||||
* @param sizeField the name of the field in your data object that represents the bubble size
|
||||
*/
|
||||
public RealmBubbleDataSet(RealmResults<T> result, String yValuesField, String sizeField) {
|
||||
|
@ -40,8 +40,8 @@ public class RealmBubbleDataSet<T extends RealmObject> extends RealmBarLineScatt
|
|||
* Constructor for creating a CandleDataSet with realm data.
|
||||
*
|
||||
* @param result the queried results from the realm database
|
||||
* @param yValuesField the name of the field in your data object that represents the yPx-yValue
|
||||
* @param xIndexField the name of the field in your data object that represents the xPx-index
|
||||
* @param yValuesField the name of the field in your data object that represents the y-yValue
|
||||
* @param xIndexField the name of the field in your data object that represents the x-index
|
||||
* @param sizeField the name of the field in your data object that represents the bubble size
|
||||
*/
|
||||
public RealmBubbleDataSet(RealmResults<T> result, String yValuesField, String xIndexField, String sizeField) {
|
||||
|
|
|
@ -70,7 +70,7 @@ public class RealmLineDataSet<T extends RealmObject> extends RealmLineRadarDataS
|
|||
* Constructor for creating a LineDataSet with realm data.
|
||||
*
|
||||
* @param result the queried results from the realm database
|
||||
* @param yValuesField the name of the field in your data object that represents the yPx-yValue
|
||||
* @param yValuesField the name of the field in your data object that represents the y-yValue
|
||||
*/
|
||||
public RealmLineDataSet(RealmResults<T> result, String yValuesField) {
|
||||
super(result, yValuesField);
|
||||
|
|
|
@ -42,7 +42,7 @@ public class RealmPieDataSet<T extends RealmObject> extends RealmBaseDataSet<T,
|
|||
* Constructor for creating a PieDataSet with realm data.
|
||||
*
|
||||
* @param result the queried results from the realm database
|
||||
* @param yValuesField the name of the field in your data object that represents the yPx-yValue
|
||||
* @param yValuesField the name of the field in your data object that represents the y-yValue
|
||||
*/
|
||||
public RealmPieDataSet(RealmResults<T> result, String yValuesField) {
|
||||
super(result, yValuesField);
|
||||
|
|
|
@ -32,7 +32,7 @@ public class RealmRadarDataSet<T extends RealmObject> extends RealmLineRadarData
|
|||
* Constructor for creating a RadarDataSet with realm data.
|
||||
*
|
||||
* @param result the queried results from the realm database
|
||||
* @param yValuesField the name of the field in your data object that represents the yPx-yValue
|
||||
* @param yValuesField the name of the field in your data object that represents the y-yValue
|
||||
*/
|
||||
public RealmRadarDataSet(RealmResults<T> result, String yValuesField) {
|
||||
super(result, yValuesField);
|
||||
|
|
|
@ -44,7 +44,7 @@ public class RealmScatterDataSet<T extends RealmObject> extends RealmLineScatter
|
|||
* Constructor for creating a ScatterDataSet with realm data.
|
||||
*
|
||||
* @param result the queried results from the realm database
|
||||
* @param yValuesField the name of the field in your data object that represents the yPx-yValue
|
||||
* @param yValuesField the name of the field in your data object that represents the y-yValue
|
||||
*/
|
||||
public RealmScatterDataSet(RealmResults<T> result, String yValuesField) {
|
||||
super(result, yValuesField);
|
||||
|
|
|
@ -12,7 +12,7 @@ import com.github.mikephil.charting.interfaces.dataprovider.LineDataProvider;
|
|||
public interface FillFormatter {
|
||||
|
||||
/**
|
||||
* Returns the vertical (yPx-axis) position where the filled-line of the
|
||||
* Returns the vertical (y-axis) position where the filled-line of the
|
||||
* LineDataSet should end.
|
||||
*
|
||||
* @param dataSet the ILineDataSet that is currently drawn
|
||||
|
|
|
@ -27,7 +27,7 @@ public class ChartHighlighter<T extends BarLineScatterCandleBubbleDataProvider>
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a Highlight object corresponding to the given xPx- and yPx- touch positions in pixels.
|
||||
* Returns a Highlight object corresponding to the given x- and y- touch positions in pixels.
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
|
@ -55,13 +55,13 @@ public class ChartHighlighter<T extends BarLineScatterCandleBubbleDataProvider>
|
|||
*/
|
||||
protected PointD getValsForTouch(float x, float y) {
|
||||
|
||||
// take any transformer to determine the xPx-axis yValue
|
||||
// take any transformer to determine the x-axis yValue
|
||||
PointD pos = mChart.getTransformer(YAxis.AxisDependency.LEFT).getValuesByTouchPoint(x, y);
|
||||
return pos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the corresponding SelectionDetail for a given xVal and yPx-touch position in pixels.
|
||||
* Returns the corresponding SelectionDetail for a given xVal and y-touch position in pixels.
|
||||
*
|
||||
* @param xVal
|
||||
* @param y
|
||||
|
@ -155,7 +155,7 @@ public class ChartHighlighter<T extends BarLineScatterCandleBubbleDataProvider>
|
|||
|
||||
/**
|
||||
* Returns the SelectionDetail of the DataSet that contains the closest yValue on the
|
||||
* yPx-axis.
|
||||
* y-axis.
|
||||
*
|
||||
* @param valsAtIndex all the values at a specific index
|
||||
* @return
|
||||
|
|
|
@ -8,10 +8,10 @@ package com.github.mikephil.charting.highlight;
|
|||
*/
|
||||
public class Highlight {
|
||||
|
||||
/** the xPx-yValue of the highlighted yValue */
|
||||
/** the x-yValue of the highlighted yValue */
|
||||
private float mX = Float.NaN;
|
||||
|
||||
/** the yPx-yValue of the highlighted yValue */
|
||||
/** the y-yValue of the highlighted yValue */
|
||||
private float mY = Float.NaN;
|
||||
|
||||
/** the index of the data object - in case it refers to more than one */
|
||||
|
@ -29,8 +29,8 @@ public class Highlight {
|
|||
/**
|
||||
* constructor
|
||||
*
|
||||
* @param x the xPx-yValue of the highlighted yValue
|
||||
* @param y the yPx-yValue of the highlighted yValue
|
||||
* @param x the x-yValue of the highlighted yValue
|
||||
* @param y the y-yValue of the highlighted yValue
|
||||
* @param dataIndex the index of the Data the highlighted yValue belongs to
|
||||
* @param dataSetIndex the index of the DataSet the highlighted yValue belongs to
|
||||
*/
|
||||
|
@ -43,8 +43,8 @@ public class Highlight {
|
|||
/**
|
||||
* Constructor, only used for stacked-barchart.
|
||||
*
|
||||
* @param x the xPx-yValue of the highlighted yValue on the xPx-axis
|
||||
* @param y the yPx-yValue of the highlighted yValue
|
||||
* @param x the x-yValue of the highlighted yValue on the x-axis
|
||||
* @param y the y-yValue of the highlighted yValue
|
||||
* @param dataIndex the index of the Data the highlighted yValue belongs to
|
||||
* @param dataSetIndex the index of the DataSet the highlighted yValue belongs to
|
||||
* @param stackIndex references which yValue of a stacked-bar entry has been
|
||||
|
@ -58,8 +58,8 @@ public class Highlight {
|
|||
/**
|
||||
* Constructor, only used for stacked-barchart.
|
||||
*
|
||||
* @param x the index of the highlighted yValue on the xPx-axis
|
||||
* @param y the yPx-yValue of the highlighted yValue
|
||||
* @param x the index of the highlighted yValue on the x-axis
|
||||
* @param y the y-yValue of the highlighted yValue
|
||||
* @param dataIndex the index of the Data the highlighted yValue belongs to
|
||||
* @param dataSetIndex the index of the DataSet the highlighted yValue belongs to
|
||||
* @param stackIndex references which yValue of a stacked-bar entry has been
|
||||
|
@ -82,7 +82,7 @@ public class Highlight {
|
|||
}
|
||||
|
||||
/**
|
||||
* returns the xPx-yValue of the highlighted yValue
|
||||
* returns the x-yValue of the highlighted yValue
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -91,7 +91,7 @@ public class Highlight {
|
|||
}
|
||||
|
||||
/**
|
||||
* returns the yPx-yValue of the highlighted yValue
|
||||
* returns the y-yValue of the highlighted yValue
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -157,7 +157,7 @@ public class Highlight {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Highlight, xPx: " + mX + "yPx: " + mY + ", dataSetIndex: " + mDataSetIndex
|
||||
return "Highlight, x: " + mX + "y: " + mY + ", dataSetIndex: " + mDataSetIndex
|
||||
+ ", stackIndex (only stacked barentry): " + mStackIndex;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,35 +17,35 @@ public interface IDataSet<T extends Entry> {
|
|||
/** ###### ###### DATA RELATED METHODS ###### ###### */
|
||||
|
||||
/**
|
||||
* returns the minimum yPx-yValue this DataSet holds
|
||||
* returns the minimum y-yValue this DataSet holds
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
float getYMin();
|
||||
|
||||
/**
|
||||
* returns the maximum yPx-yValue this DataSet holds
|
||||
* returns the maximum y-yValue this DataSet holds
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
float getYMax();
|
||||
|
||||
/**
|
||||
* returns the minimum xPx-yValue this DataSet holds
|
||||
* returns the minimum x-yValue this DataSet holds
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
float getXMin();
|
||||
|
||||
/**
|
||||
* returns the maximum xPx-yValue this DataSet holds
|
||||
* returns the maximum x-yValue this DataSet holds
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
float getXMax();
|
||||
|
||||
/**
|
||||
* Returns the number of yPx-values this DataSet represents -> the size of the yPx-values array
|
||||
* Returns the number of y-values this DataSet represents -> the size of the y-values array
|
||||
* -> yvals.size()
|
||||
*
|
||||
* @return
|
||||
|
@ -53,7 +53,7 @@ public interface IDataSet<T extends Entry> {
|
|||
int getEntryCount();
|
||||
|
||||
/**
|
||||
* Calculates the minimum and maximum xPx and yPx values (mXMin, mXMax, mYMin, mYMax).
|
||||
* Calculates the minimum and maximum x and y values (mXMin, mXMax, mYMin, mYMax).
|
||||
*/
|
||||
void calcMinMax();
|
||||
|
||||
|
@ -65,7 +65,7 @@ public interface IDataSet<T extends Entry> {
|
|||
* not over-use in performance critical situations.
|
||||
*
|
||||
* @param xPos
|
||||
* @param rounding determine to round up/down/closest if there is no Entry matching the provided xPx-index
|
||||
* @param rounding determine to round up/down/closest if there is no Entry matching the provided x-index
|
||||
* @return
|
||||
*/
|
||||
T getEntryForXPos(float xPos, DataSet.Rounding rounding);
|
||||
|
@ -109,7 +109,7 @@ public interface IDataSet<T extends Entry> {
|
|||
* not over-use in performance critical situations.
|
||||
*
|
||||
* @param xPos
|
||||
* @param rounding determine to round up/down/closest if there is no Entry matching the provided xPx-index
|
||||
* @param rounding determine to round up/down/closest if there is no Entry matching the provided x-index
|
||||
* @return
|
||||
*/
|
||||
int getEntryIndex(float xPos, DataSet.Rounding rounding);
|
||||
|
@ -135,7 +135,7 @@ public interface IDataSet<T extends Entry> {
|
|||
float getYValueForXValue(float xVal);
|
||||
|
||||
/**
|
||||
* Returns all of the yPx values of the Entry objects at the given xPos. Returns
|
||||
* Returns all of the y values of the Entry objects at the given xPos. Returns
|
||||
* Float.NaN if no yValue is at the given xPos. INFORMATION: This method
|
||||
* does calculations at runtime. Do not over-use in performance critical
|
||||
* situations.
|
||||
|
@ -178,7 +178,7 @@ public interface IDataSet<T extends Entry> {
|
|||
|
||||
/**
|
||||
* Adds an Entry to the DataSet dynamically.
|
||||
* Entries are added to their appropriate index respective to it's xPx-index.
|
||||
* Entries are added to their appropriate index respective to it's x-index.
|
||||
* This will also recalculate the current minimum and maximum
|
||||
* values of the DataSet and the yValue-sum.
|
||||
*
|
||||
|
@ -250,7 +250,7 @@ public interface IDataSet<T extends Entry> {
|
|||
YAxis.AxisDependency getAxisDependency();
|
||||
|
||||
/**
|
||||
* Set the yPx-axis this DataSet should be plotted against (either LEFT or
|
||||
* Set the y-axis this DataSet should be plotted against (either LEFT or
|
||||
* RIGHT). Default: LEFT
|
||||
*
|
||||
* @param dependency
|
||||
|
@ -373,7 +373,7 @@ public interface IDataSet<T extends Entry> {
|
|||
float getValueTextSize();
|
||||
|
||||
/**
|
||||
* set this to true to draw yPx-values on the chart NOTE (for bar and
|
||||
* set this to true to draw y-values on the chart NOTE (for bar and
|
||||
* linechart): if "maxvisiblecount" is reached, no values will be drawn even
|
||||
* if this is enabled
|
||||
*
|
||||
|
@ -382,7 +382,7 @@ public interface IDataSet<T extends Entry> {
|
|||
void setDrawValues(boolean enabled);
|
||||
|
||||
/**
|
||||
* Returns true if yPx-yValue drawing is enabled, false if not
|
||||
* Returns true if y-yValue drawing is enabled, false if not
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -126,10 +126,10 @@ public class BarLineChartTouchListener extends ChartTouchListener<BarLineChartBa
|
|||
|
||||
saveTouchStart(event);
|
||||
|
||||
// get the distance between the pointers on the xPx-axis
|
||||
// get the distance between the pointers on the x-axis
|
||||
mSavedXDist = getXDist(event);
|
||||
|
||||
// get the distance between the pointers on the yPx-axis
|
||||
// get the distance between the pointers on the y-axis
|
||||
mSavedYDist = getYDist(event);
|
||||
|
||||
// get the total distance between the pointers
|
||||
|
@ -363,7 +363,7 @@ public class BarLineChartTouchListener extends ChartTouchListener<BarLineChartBa
|
|||
mLastGesture = ChartGesture.X_ZOOM;
|
||||
|
||||
float xDist = getXDist(event);
|
||||
float scaleX = xDist / mSavedXDist; // xPx-axis scale
|
||||
float scaleX = xDist / mSavedXDist; // x-axis scale
|
||||
|
||||
boolean isZoomingOut = (scaleX < 1);
|
||||
boolean canZoomMoreX = isZoomingOut ?
|
||||
|
@ -384,7 +384,7 @@ public class BarLineChartTouchListener extends ChartTouchListener<BarLineChartBa
|
|||
mLastGesture = ChartGesture.Y_ZOOM;
|
||||
|
||||
float yDist = getYDist(event);
|
||||
float scaleY = yDist / mSavedYDist; // yPx-axis scale
|
||||
float scaleY = yDist / mSavedYDist; // y-axis scale
|
||||
|
||||
boolean isZoomingOut = (scaleY < 1);
|
||||
boolean canZoomMoreY = isZoomingOut ?
|
||||
|
@ -450,7 +450,7 @@ public class BarLineChartTouchListener extends ChartTouchListener<BarLineChartBa
|
|||
}
|
||||
|
||||
/**
|
||||
* calculates the distance on the xPx-axis between two pointers (fingers on
|
||||
* calculates the distance on the x-axis between two pointers (fingers on
|
||||
* the display)
|
||||
*
|
||||
* @param e
|
||||
|
@ -462,7 +462,7 @@ public class BarLineChartTouchListener extends ChartTouchListener<BarLineChartBa
|
|||
}
|
||||
|
||||
/**
|
||||
* calculates the distance on the yPx-axis between two pointers (fingers on
|
||||
* calculates the distance on the y-axis between two pointers (fingers on
|
||||
* the display)
|
||||
*
|
||||
* @param e
|
||||
|
@ -474,7 +474,7 @@ public class BarLineChartTouchListener extends ChartTouchListener<BarLineChartBa
|
|||
}
|
||||
|
||||
/**
|
||||
* returns the correct translation depending on the provided xPx and yPx touch
|
||||
* returns the correct translation depending on the provided x and y touch
|
||||
* points
|
||||
*
|
||||
* @param x
|
||||
|
@ -532,7 +532,7 @@ public class BarLineChartTouchListener extends ChartTouchListener<BarLineChartBa
|
|||
mChart.zoom(mChart.isScaleXEnabled() ? 1.4f : 1f, mChart.isScaleYEnabled() ? 1.4f : 1f, trans.x, trans.y);
|
||||
|
||||
if (mChart.isLogEnabled())
|
||||
Log.i("BarlineChartTouch", "Double-Tap, Zooming In, xPx: " + trans.x + ", yPx: "
|
||||
Log.i("BarlineChartTouch", "Double-Tap, Zooming In, x: " + trans.x + ", y: "
|
||||
+ trans.y);
|
||||
}
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@ public interface OnChartGestureListener {
|
|||
* Callbacks when the chart is scaled / zoomed via pinch zoom gesture.
|
||||
*
|
||||
* @param me
|
||||
* @param scaleX scalefactor on the xPx-axis
|
||||
* @param scaleY scalefactor on the yPx-axis
|
||||
* @param scaleX scalefactor on the x-axis
|
||||
* @param scaleY scalefactor on the y-axis
|
||||
*/
|
||||
void onChartScale(MotionEvent me, float scaleX, float scaleY);
|
||||
|
||||
|
@ -69,8 +69,8 @@ public interface OnChartGestureListener {
|
|||
* Callbacks when the chart is moved / translated via drag gesture.
|
||||
*
|
||||
* @param me
|
||||
* @param dX translation distance on the xPx-axis
|
||||
* @param dY translation distance on the yPx-axis
|
||||
* @param dX translation distance on the x-axis
|
||||
* @param dY translation distance on the y-axis
|
||||
*/
|
||||
void onChartTranslate(MotionEvent me, float dX, float dY);
|
||||
}
|
||||
|
|
|
@ -283,7 +283,7 @@ public class PieRadarChartTouchListener extends ChartTouchListener<PieRadarChart
|
|||
|
||||
/**
|
||||
* sets the starting angle of the rotation, this is only used by the touch
|
||||
* listener, xPx and yPx is the touch position
|
||||
* listener, x and y is the touch position
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
|
|
|
@ -31,7 +31,7 @@ public abstract class AxisRenderer extends Renderer {
|
|||
protected Paint mGridPaint;
|
||||
|
||||
/**
|
||||
* paint for the xPx-label values
|
||||
* paint for the x-label values
|
||||
*/
|
||||
protected Paint mAxisLabelPaint;
|
||||
|
||||
|
@ -117,7 +117,7 @@ public abstract class AxisRenderer extends Renderer {
|
|||
*/
|
||||
public void computeAxis(float min, float max, boolean inverted) {
|
||||
|
||||
// calculate the starting and entry point of the yPx-labels (depending on
|
||||
// calculate the starting and entry point of the y-labels (depending on
|
||||
// zoom / contentrect bounds)
|
||||
if (mViewPortHandler != null && mViewPortHandler.contentWidth() > 10 && !mViewPortHandler.isFullyZoomedOutY()) {
|
||||
|
||||
|
@ -157,7 +157,7 @@ public abstract class AxisRenderer extends Renderer {
|
|||
return;
|
||||
}
|
||||
|
||||
// Find out how much spacing (in yPx yValue space) between axis values
|
||||
// Find out how much spacing (in y yValue space) between axis values
|
||||
double rawInterval = range / labelCount;
|
||||
double interval = Utils.roundToNextSignificant(rawInterval);
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ public class BubbleChartRenderer extends DataRenderer {
|
|||
|
||||
boolean normalizeSize = dataSet.isNormalizeSizeEnabled();
|
||||
|
||||
// calcualte the full width of 1 step on the xPx-axis
|
||||
// calcualte the full width of 1 step on the x-axis
|
||||
final float maxBubbleWidth = Math.abs(sizeBuffer[2] - sizeBuffer[0]);
|
||||
final float maxBubbleHeight = Math.abs(mViewPortHandler.contentBottom() - mViewPortHandler.contentTop());
|
||||
final float referenceSize = Math.min(maxBubbleHeight, maxBubbleWidth);
|
||||
|
@ -245,7 +245,7 @@ public class BubbleChartRenderer extends DataRenderer {
|
|||
|
||||
boolean normalizeSize = dataSet.isNormalizeSizeEnabled();
|
||||
|
||||
// calcualte the full width of 1 step on the xPx-axis
|
||||
// calcualte the full width of 1 step on the x-axis
|
||||
final float maxBubbleWidth = Math.abs(sizeBuffer[2] - sizeBuffer[0]);
|
||||
final float maxBubbleHeight = Math.abs(
|
||||
mViewPortHandler.contentBottom() - mViewPortHandler.contentTop());
|
||||
|
|
|
@ -339,7 +339,7 @@ public class CandleStickChartRenderer extends LineScatterCandleRadarRenderer {
|
|||
dataSetIndex++) {
|
||||
|
||||
float x = high.getX(); // get the
|
||||
// xPx-position
|
||||
// x-position
|
||||
|
||||
ICandleDataSet set = mChart.getCandleData().getDataSetByIndex(dataSetIndex);
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ public abstract class LineScatterCandleRadarRenderer extends DataRenderer {
|
|||
* Draws vertical & horizontal highlight-lines if enabled.
|
||||
*
|
||||
* @param c
|
||||
* @param x xPx-position of the highlight line intersection
|
||||
* @param y yPx-position of the highlight line intersection
|
||||
* @param x x-position of the highlight line intersection
|
||||
* @param y y-position of the highlight line intersection
|
||||
* @param set the currently drawn dataset
|
||||
*/
|
||||
protected void drawHighlightLines(Canvas c, float x, float y, ILineScatterCandleRadarDataSet set) {
|
||||
|
|
|
@ -36,7 +36,7 @@ public class XAxisRenderer extends AxisRenderer {
|
|||
@Override
|
||||
public void computeAxis(float min, float max, boolean inverted) {
|
||||
|
||||
// calculate the starting and entry point of the yPx-labels (depending on
|
||||
// calculate the starting and entry point of the y-labels (depending on
|
||||
// zoom / contentrect bounds)
|
||||
if (mViewPortHandler.contentWidth() > 10 && !mViewPortHandler.isFullyZoomedOutX()) {
|
||||
|
||||
|
@ -156,7 +156,7 @@ public class XAxisRenderer extends AxisRenderer {
|
|||
}
|
||||
|
||||
/**
|
||||
* draws the xPx-labels on the specified yPx-position
|
||||
* draws the x-labels on the specified y-position
|
||||
*
|
||||
* @param pos
|
||||
*/
|
||||
|
@ -169,7 +169,7 @@ public class XAxisRenderer extends AxisRenderer {
|
|||
|
||||
for (int i = 0; i < positions.length; i += 2) {
|
||||
|
||||
// only fill xPx values
|
||||
// only fill x values
|
||||
if (centeringEnabled) {
|
||||
positions[i] = mXAxis.mCenteredEntries[i / 2];
|
||||
} else {
|
||||
|
@ -223,7 +223,7 @@ public class XAxisRenderer extends AxisRenderer {
|
|||
float[] positions = new float[mXAxis.mEntryCount * 2];
|
||||
|
||||
for (int i = 0; i < positions.length; i += 2) {
|
||||
// only fill xPx values
|
||||
// only fill x values
|
||||
positions[i] = mXAxis.mEntries[i / 2];
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public class XAxisRendererHorizontalBarChart extends XAxisRenderer {
|
|||
@Override
|
||||
public void computeAxis(float min, float max, boolean inverted) {
|
||||
|
||||
// calculate the starting and entry point of the yPx-labels (depending on
|
||||
// calculate the starting and entry point of the y-labels (depending on
|
||||
// zoom / contentrect bounds)
|
||||
if (mViewPortHandler.contentWidth() > 10 && !mViewPortHandler.isFullyZoomedOutY()) {
|
||||
|
||||
|
@ -130,7 +130,7 @@ public class XAxisRendererHorizontalBarChart extends XAxisRenderer {
|
|||
|
||||
for (int i = 0; i < positions.length; i += 2) {
|
||||
|
||||
// only fill xPx values
|
||||
// only fill x values
|
||||
if (centeringEnabled) {
|
||||
positions[i + 1] = mXAxis.mCenteredEntries[i / 2];
|
||||
} else {
|
||||
|
|
|
@ -55,7 +55,7 @@ public class YAxisRenderer extends AxisRenderer {
|
|||
// return;
|
||||
// }
|
||||
//
|
||||
// // Find out how much spacing (in yPx yValue space) between axis values
|
||||
// // Find out how much spacing (in y yValue space) between axis values
|
||||
// double rawInterval = range / labelCount;
|
||||
// double interval = Utils.roundToNextSignificant(rawInterval);
|
||||
//
|
||||
|
@ -142,7 +142,7 @@ public class YAxisRenderer extends AxisRenderer {
|
|||
// }
|
||||
|
||||
/**
|
||||
* draws the yPx-axis labels to the screen
|
||||
* draws the y-axis labels to the screen
|
||||
*/
|
||||
@Override
|
||||
public void renderAxisLabels(Canvas c) {
|
||||
|
@ -207,7 +207,7 @@ public class YAxisRenderer extends AxisRenderer {
|
|||
}
|
||||
|
||||
/**
|
||||
* draws the yPx-labels on the specified xPx-position
|
||||
* draws the y-labels on the specified x-position
|
||||
*
|
||||
* @param fixedPosition
|
||||
* @param positions
|
||||
|
|
|
@ -30,13 +30,13 @@ public class YAxisRendererHorizontalBarChart extends YAxisRenderer {
|
|||
/**
|
||||
* Computes the axis values.
|
||||
*
|
||||
* @param yMin - the minimum yPx-yValue in the data object for this axis
|
||||
* @param yMax - the maximum yPx-yValue in the data object for this axis
|
||||
* @param yMin - the minimum y-yValue in the data object for this axis
|
||||
* @param yMax - the maximum y-yValue in the data object for this axis
|
||||
*/
|
||||
@Override
|
||||
public void computeAxis(float yMin, float yMax, boolean inverted) {
|
||||
|
||||
// calculate the starting and entry point of the yPx-labels (depending on
|
||||
// calculate the starting and entry point of the y-labels (depending on
|
||||
// zoom / contentrect bounds)
|
||||
if (mViewPortHandler.contentHeight() > 10 && !mViewPortHandler.isFullyZoomedOutX()) {
|
||||
|
||||
|
@ -58,7 +58,7 @@ public class YAxisRendererHorizontalBarChart extends YAxisRenderer {
|
|||
}
|
||||
|
||||
/**
|
||||
* draws the yPx-axis labels to the screen
|
||||
* draws the y-axis labels to the screen
|
||||
*/
|
||||
@Override
|
||||
public void renderAxisLabels(Canvas c) {
|
||||
|
@ -122,7 +122,7 @@ public class YAxisRendererHorizontalBarChart extends YAxisRenderer {
|
|||
}
|
||||
|
||||
/**
|
||||
* draws the yPx-labels on the specified xPx-position
|
||||
* draws the y-labels on the specified x-position
|
||||
*
|
||||
* @param fixedPosition
|
||||
* @param positions
|
||||
|
|
|
@ -37,7 +37,7 @@ public class YAxisRendererRadarChart extends YAxisRenderer {
|
|||
return;
|
||||
}
|
||||
|
||||
// Find out how much spacing (in yPx yValue space) between axis values
|
||||
// Find out how much spacing (in y yValue space) between axis values
|
||||
double rawInterval = range / labelCount;
|
||||
double interval = Utils.roundToNextSignificant(rawInterval);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ public final class FSize {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return width + "xPx" + height;
|
||||
return width + "x" + height;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -20,6 +20,6 @@ public class PointD {
|
|||
* returns a string representation of the object
|
||||
*/
|
||||
public String toString() {
|
||||
return "PointD, xPx: " + x + ", yPx: " + y;
|
||||
return "PointD, x: " + x + ", y: " + y;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,8 +96,8 @@ public class Transformer {
|
|||
}
|
||||
|
||||
/**
|
||||
* Transforms an List of Entry into a float array containing the xPx and
|
||||
* yPx values transformed with all matrices for the SCATTERCHART.
|
||||
* Transforms an List of Entry into a float array containing the x and
|
||||
* y values transformed with all matrices for the SCATTERCHART.
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
|
@ -123,8 +123,8 @@ public class Transformer {
|
|||
}
|
||||
|
||||
/**
|
||||
* Transforms an List of Entry into a float array containing the xPx and
|
||||
* yPx values transformed with all matrices for the BUBBLECHART.
|
||||
* Transforms an List of Entry into a float array containing the x and
|
||||
* y values transformed with all matrices for the BUBBLECHART.
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
|
@ -152,8 +152,8 @@ public class Transformer {
|
|||
}
|
||||
|
||||
/**
|
||||
* Transforms an List of Entry into a float array containing the xPx and
|
||||
* yPx values transformed with all matrices for the LINECHART.
|
||||
* Transforms an List of Entry into a float array containing the x and
|
||||
* y values transformed with all matrices for the LINECHART.
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
|
@ -181,8 +181,8 @@ public class Transformer {
|
|||
}
|
||||
|
||||
/**
|
||||
* Transforms an List of Entry into a float array containing the xPx and
|
||||
* yPx values transformed with all matrices for the CANDLESTICKCHART.
|
||||
* Transforms an List of Entry into a float array containing the x and
|
||||
* y values transformed with all matrices for the CANDLESTICKCHART.
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
|
@ -210,8 +210,8 @@ public class Transformer {
|
|||
}
|
||||
|
||||
/**
|
||||
* Transforms an List of Entry into a float array containing the xPx and
|
||||
* yPx values transformed with all matrices for the BARCHART.
|
||||
* Transforms an List of Entry into a float array containing the x and
|
||||
* y values transformed with all matrices for the BARCHART.
|
||||
*
|
||||
* @param data
|
||||
* @param dataSet the dataset index
|
||||
|
@ -230,7 +230,7 @@ public class Transformer {
|
|||
Entry e = data.getEntryForIndex(j / 2);
|
||||
float i = e.getX();
|
||||
|
||||
// calculate the xPx-position, depending on datasetcount
|
||||
// calculate the x-position, depending on datasetcount
|
||||
float x = i + i * (setCount - 1) + dataSet + space * i
|
||||
+ space / 2f;
|
||||
float y = e.getY();
|
||||
|
@ -365,7 +365,7 @@ public class Transformer {
|
|||
}
|
||||
|
||||
/**
|
||||
* Transforms the given array of touch positions (pixels) (xPx, yPx, xPx, yPx, ...)
|
||||
* Transforms the given array of touch positions (pixels) (x, y, x, y, ...)
|
||||
* into values on the chart.
|
||||
*
|
||||
* @param pixels
|
||||
|
@ -391,7 +391,7 @@ public class Transformer {
|
|||
float[] ptsBuffer = new float[2];
|
||||
|
||||
/**
|
||||
* Returns the xPx and yPx values in the chart at the given touch point
|
||||
* Returns the x and y values in the chart at the given touch point
|
||||
* (encapsulated in a PointD). This method transforms pixel coordinates to
|
||||
* coordinates / values in the chart. This is the opposite method to
|
||||
* getPixelsForValues(...).
|
||||
|
@ -414,7 +414,7 @@ public class Transformer {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the xPx and yPx coordinates (pixels) for a given xPx and yPx yValue in the chart.
|
||||
* Returns the x and y coordinates (pixels) for a given x and y yValue in the chart.
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
|
|
|
@ -383,7 +383,7 @@ public abstract class Utils {
|
|||
|
||||
/**
|
||||
* Returns the index of the DataSet that contains the closest yValue on the
|
||||
* yPx-axis. This is needed for highlighting. This will return -Integer.MAX_VALUE if failure.
|
||||
* y-axis. This is needed for highlighting. This will return -Integer.MAX_VALUE if failure.
|
||||
*
|
||||
* @param valsAtIndex all the values at a specific index
|
||||
* @return
|
||||
|
@ -401,7 +401,7 @@ public abstract class Utils {
|
|||
|
||||
/**
|
||||
* Returns the SelectionDetail of the DataSet that contains the closest yValue on the
|
||||
* yPx-axis.
|
||||
* y-axis.
|
||||
*
|
||||
* @param valsAtIndex all the values at a specific index
|
||||
* @return
|
||||
|
@ -721,7 +721,7 @@ public abstract class Utils {
|
|||
*/
|
||||
public static double granularity(float range, int labelCount) {
|
||||
|
||||
// Find out how much spacing (in yPx yValue space) between axis values
|
||||
// Find out how much spacing (in y yValue space) between axis values
|
||||
double rawInterval = range / labelCount;
|
||||
double interval = Utils.roundToNextSignificant(rawInterval);
|
||||
|
||||
|
|
|
@ -28,52 +28,52 @@ public class ViewPortHandler {
|
|||
protected float mChartHeight = 0f;
|
||||
|
||||
/**
|
||||
* minimum scale yValue on the yPx-axis
|
||||
* minimum scale yValue on the y-axis
|
||||
*/
|
||||
private float mMinScaleY = 1f;
|
||||
|
||||
/**
|
||||
* maximum scale yValue on the yPx-axis
|
||||
* maximum scale yValue on the y-axis
|
||||
*/
|
||||
private float mMaxScaleY = Float.MAX_VALUE;
|
||||
|
||||
/**
|
||||
* minimum scale yValue on the xPx-axis
|
||||
* minimum scale yValue on the x-axis
|
||||
*/
|
||||
private float mMinScaleX = 1f;
|
||||
|
||||
/**
|
||||
* maximum scale yValue on the xPx-axis
|
||||
* maximum scale yValue on the x-axis
|
||||
*/
|
||||
private float mMaxScaleX = Float.MAX_VALUE;
|
||||
|
||||
/**
|
||||
* contains the current scale factor of the xPx-axis
|
||||
* contains the current scale factor of the x-axis
|
||||
*/
|
||||
private float mScaleX = 1f;
|
||||
|
||||
/**
|
||||
* contains the current scale factor of the yPx-axis
|
||||
* contains the current scale factor of the y-axis
|
||||
*/
|
||||
private float mScaleY = 1f;
|
||||
|
||||
/**
|
||||
* current translation (drag distance) on the xPx-axis
|
||||
* current translation (drag distance) on the x-axis
|
||||
*/
|
||||
private float mTransX = 0f;
|
||||
|
||||
/**
|
||||
* current translation (drag distance) on the yPx-axis
|
||||
* current translation (drag distance) on the y-axis
|
||||
*/
|
||||
private float mTransY = 0f;
|
||||
|
||||
/**
|
||||
* offset that allows the chart to be dragged over its bounds on the xPx-axis
|
||||
* offset that allows the chart to be dragged over its bounds on the x-axis
|
||||
*/
|
||||
private float mTransOffsetX = 0f;
|
||||
|
||||
/**
|
||||
* offset that allows the chart to be dragged over its bounds on the xPx-axis
|
||||
* offset that allows the chart to be dragged over its bounds on the x-axis
|
||||
*/
|
||||
private float mTransOffsetY = 0f;
|
||||
|
||||
|
@ -180,7 +180,7 @@ public class ViewPortHandler {
|
|||
/** CODE BELOW THIS RELATED TO SCALING AND GESTURES */
|
||||
|
||||
/**
|
||||
* Zooms in by 1.4f, xPx and yPx are the coordinates (in pixels) of the zoom
|
||||
* Zooms in by 1.4f, x and y are the coordinates (in pixels) of the zoom
|
||||
* center.
|
||||
*
|
||||
* @param x
|
||||
|
@ -197,7 +197,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Zooms out by 0.7f, xPx and yPx are the coordinates (in pixels) of the zoom
|
||||
* Zooms out by 0.7f, x and y are the coordinates (in pixels) of the zoom
|
||||
* center.
|
||||
*/
|
||||
public Matrix zoomOut(float x, float y) {
|
||||
|
@ -228,7 +228,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Post-scales by the specified scale factors. xPx and yPx is pivot.
|
||||
* Post-scales by the specified scale factors. x and y is pivot.
|
||||
*
|
||||
* @param scaleX
|
||||
* @param scaleY
|
||||
|
@ -264,7 +264,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the scale factor to the specified values. xPx and yPx is pivot.
|
||||
* Sets the scale factor to the specified values. x and y is pivot.
|
||||
*
|
||||
* @param scaleX
|
||||
* @param scaleY
|
||||
|
@ -329,7 +329,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Centers the viewport around the specified position (xPx-index and yPx-yValue)
|
||||
* Centers the viewport around the specified position (x-index and y-yValue)
|
||||
* in the chart. Centering the viewport outside the bounds of the chart is
|
||||
* not possible. Makes most sense in combination with the
|
||||
* setScaleMinima(...) method.
|
||||
|
@ -391,10 +391,10 @@ public class ViewPortHandler {
|
|||
float curTransY = matrixBuffer[Matrix.MTRANS_Y];
|
||||
float curScaleY = matrixBuffer[Matrix.MSCALE_Y];
|
||||
|
||||
// min scale-xPx is 1f
|
||||
// min scale-x is 1f
|
||||
mScaleX = Math.min(Math.max(mMinScaleX, curScaleX), mMaxScaleX);
|
||||
|
||||
// min scale-yPx is 1f
|
||||
// min scale-y is 1f
|
||||
mScaleY = Math.min(Math.max(mMinScaleY, curScaleY), mMaxScaleY);
|
||||
|
||||
float width = 0f;
|
||||
|
@ -421,7 +421,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the minimum scale factor for the xPx-axis
|
||||
* Sets the minimum scale factor for the x-axis
|
||||
*
|
||||
* @param xScale
|
||||
*/
|
||||
|
@ -436,7 +436,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the maximum scale factor for the xPx-axis
|
||||
* Sets the maximum scale factor for the x-axis
|
||||
*
|
||||
* @param xScale
|
||||
*/
|
||||
|
@ -451,7 +451,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the minimum and maximum scale factors for the xPx-axis
|
||||
* Sets the minimum and maximum scale factors for the x-axis
|
||||
*
|
||||
* @param minScaleX
|
||||
* @param maxScaleX
|
||||
|
@ -471,7 +471,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the minimum scale factor for the yPx-axis
|
||||
* Sets the minimum scale factor for the y-axis
|
||||
*
|
||||
* @param yScale
|
||||
*/
|
||||
|
@ -486,7 +486,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the maximum scale factor for the yPx-axis
|
||||
* Sets the maximum scale factor for the y-axis
|
||||
*
|
||||
* @param yScale
|
||||
*/
|
||||
|
@ -556,14 +556,14 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* returns the current xPx-scale factor
|
||||
* returns the current x-scale factor
|
||||
*/
|
||||
public float getScaleX() {
|
||||
return mScaleX;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the current yPx-scale factor
|
||||
* returns the current y-scale factor
|
||||
*/
|
||||
public float getScaleY() {
|
||||
return mScaleY;
|
||||
|
@ -586,7 +586,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the translation (drag / pan) distance on the xPx-axis
|
||||
* Returns the translation (drag / pan) distance on the x-axis
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -595,7 +595,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the translation (drag / pan) distance on the yPx-axis
|
||||
* Returns the translation (drag / pan) distance on the y-axis
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -617,7 +617,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if the chart is fully zoomed out on it's yPx-axis (vertical).
|
||||
* Returns true if the chart is fully zoomed out on it's y-axis (vertical).
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -629,7 +629,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if the chart is fully zoomed out on it's xPx-axis
|
||||
* Returns true if the chart is fully zoomed out on it's x-axis
|
||||
* (horizontal).
|
||||
*
|
||||
* @return
|
||||
|
@ -643,7 +643,7 @@ public class ViewPortHandler {
|
|||
|
||||
/**
|
||||
* Set an offset in dp that allows the user to drag the chart over it's
|
||||
* bounds on the xPx-axis.
|
||||
* bounds on the x-axis.
|
||||
*
|
||||
* @param offset
|
||||
*/
|
||||
|
@ -653,7 +653,7 @@ public class ViewPortHandler {
|
|||
|
||||
/**
|
||||
* Set an offset in dp that allows the user to drag the chart over it's
|
||||
* bounds on the yPx-axis.
|
||||
* bounds on the y-axis.
|
||||
*
|
||||
* @param offset
|
||||
*/
|
||||
|
@ -662,7 +662,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if both drag offsets (xPx and yPx) are zero or smaller.
|
||||
* Returns true if both drag offsets (x and y) are zero or smaller.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -671,7 +671,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if the chart is not yet fully zoomed out on the xPx-axis
|
||||
* Returns true if the chart is not yet fully zoomed out on the x-axis
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -680,7 +680,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if the chart is not yet fully zoomed in on the xPx-axis
|
||||
* Returns true if the chart is not yet fully zoomed in on the x-axis
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -689,7 +689,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if the chart is not yet fully zoomed out on the yPx-axis
|
||||
* Returns true if the chart is not yet fully zoomed out on the y-axis
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -698,7 +698,7 @@ public class ViewPortHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if the chart is not yet fully zoomed in on the yPx-axis
|
||||
* Returns true if the chart is not yet fully zoomed in on the y-axis
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue