public class RouteElevationChart
extends GraphicalView
implements android.widget.SeekBar.OnSeekBarChangeListener
Modifier and Type | Class and Description |
---|---|
static class |
RouteElevationChart.CustomLineChart |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_TAG |
Constructor and Description |
---|
RouteElevationChart(android.content.Context context,
LineChart lineChart) |
RouteElevationChart(android.content.Context context,
LineChart lineChart,
XYMultipleSeriesDataset dataset) |
RouteElevationChart(android.content.Context context,
XYMultipleSeriesRenderer renderer,
XYImageSeriesRenderer imageRenderer,
XYMultipleSeriesDataset dataset,
XYImageSeriesDataset imageDataset,
XYSeries selected) |
Modifier and Type | Method and Description |
---|---|
void |
addCountsListener(ChartSelectionListener l) |
int |
getClosestIndexForX(double xVal)
Takes an x-value and finds the index of the closest x-value in dataset's series '0'
|
XYMultipleSeriesDataset |
getDataset() |
XYImageSeriesDataset |
getImageDataset() |
int |
getLeftMargin() |
double |
getRealPosition() |
double |
getYFromIndex(int index) |
protected void |
onDraw(android.graphics.Canvas canvas) |
protected void |
onLayout(boolean changed,
int left,
int top,
int right,
int bottom) |
void |
onProgressChanged(android.widget.SeekBar seekBar,
int progress,
boolean fromUser) |
void |
onStartTrackingTouch(android.widget.SeekBar seekBar) |
void |
onStopTrackingTouch(android.widget.SeekBar seekBar) |
boolean |
onTouchEvent(android.view.MotionEvent event) |
void |
setMargins(int leftMargin,
int rightMargin) |
void |
setPositions(double realPos,
int seekPos) |
double[] |
toScreenPoint(double[] realPoint) |
protected void |
updateForInteraction(boolean moveSeeker)
Based on the line position on the chart, this function calculates the real point on the chart
and updates the listeners.
|
public static final java.lang.String _TAG
public RouteElevationChart(android.content.Context context, LineChart lineChart)
public RouteElevationChart(android.content.Context context, LineChart lineChart, XYMultipleSeriesDataset dataset)
public RouteElevationChart(android.content.Context context, XYMultipleSeriesRenderer renderer, XYImageSeriesRenderer imageRenderer, XYMultipleSeriesDataset dataset, XYImageSeriesDataset imageDataset, XYSeries selected)
public XYMultipleSeriesDataset getDataset()
public XYImageSeriesDataset getImageDataset()
protected void onLayout(boolean changed, int left, int top, int right, int bottom)
public boolean onTouchEvent(android.view.MotionEvent event)
public void addCountsListener(ChartSelectionListener l)
public int getLeftMargin()
public void setMargins(int leftMargin, int rightMargin)
public double[] toScreenPoint(double[] realPoint)
public void setPositions(double realPos, int seekPos)
public double getRealPosition()
protected void onDraw(android.graphics.Canvas canvas)
public void onProgressChanged(android.widget.SeekBar seekBar, int progress, boolean fromUser)
onProgressChanged
in interface android.widget.SeekBar.OnSeekBarChangeListener
protected void updateForInteraction(boolean moveSeeker)
public double getYFromIndex(int index)
public int getClosestIndexForX(double xVal)
xVal
- the x value to use for finding the index of the closest x value in the datasetpublic void onStartTrackingTouch(android.widget.SeekBar seekBar)
onStartTrackingTouch
in interface android.widget.SeekBar.OnSeekBarChangeListener
public void onStopTrackingTouch(android.widget.SeekBar seekBar)
onStopTrackingTouch
in interface android.widget.SeekBar.OnSeekBarChangeListener