public abstract class AxisRenderer extends Renderer
| Modifier and Type | Field and Description |
|---|---|
protected AxisBase |
mAxis
base axis this axis renderer works with
|
protected android.graphics.Paint |
mAxisLabelPaint
paint for the x-label values
|
protected android.graphics.Paint |
mAxisLinePaint
paint for the line surrounding the chart
|
protected android.graphics.Paint |
mGridPaint
paint object for the grid lines
|
protected android.graphics.Paint |
mLimitLinePaint
paint used for the limit lines
|
protected Transformer |
mTrans
transformer to transform values to screen pixels and return
|
mViewPortHandler| Constructor and Description |
|---|
AxisRenderer(ViewPortHandler viewPortHandler,
Transformer trans,
AxisBase axis) |
| Modifier and Type | Method and Description |
|---|---|
void |
computeAxis(float min,
float max,
boolean inverted)
Computes the axis values.
|
protected void |
computeAxisValues(float min,
float max)
Sets up the axis values.
|
android.graphics.Paint |
getPaintAxisLabels()
Returns the Paint object used for drawing the axis (labels).
|
android.graphics.Paint |
getPaintAxisLine()
Returns the Paint object that is used for drawing the axis-line that goes
alongside the axis.
|
android.graphics.Paint |
getPaintGrid()
Returns the Paint object that is used for drawing the grid-lines of the
axis.
|
Transformer |
getTransformer()
Returns the Transformer object used for transforming the axis values.
|
abstract void |
renderAxisLabels(android.graphics.Canvas c)
Draws the axis labels to the screen.
|
abstract void |
renderAxisLine(android.graphics.Canvas c)
Draws the line that goes alongside the axis.
|
abstract void |
renderGridLines(android.graphics.Canvas c)
Draws the grid lines belonging to the axis.
|
abstract void |
renderLimitLines(android.graphics.Canvas c)
Draws the LimitLines associated with this axis to the screen.
|
protected AxisBase mAxis
protected Transformer mTrans
protected android.graphics.Paint mGridPaint
protected android.graphics.Paint mAxisLabelPaint
protected android.graphics.Paint mAxisLinePaint
protected android.graphics.Paint mLimitLinePaint
public AxisRenderer(ViewPortHandler viewPortHandler, Transformer trans, AxisBase axis)
public android.graphics.Paint getPaintAxisLabels()
public android.graphics.Paint getPaintGrid()
public android.graphics.Paint getPaintAxisLine()
public Transformer getTransformer()
public void computeAxis(float min,
float max,
boolean inverted)
min - - the minimum value in the data object for this axismax - - the maximum value in the data object for this axisprotected void computeAxisValues(float min,
float max)
public abstract void renderAxisLabels(android.graphics.Canvas c)
c - public abstract void renderGridLines(android.graphics.Canvas c)
c - public abstract void renderAxisLine(android.graphics.Canvas c)
c - public abstract void renderLimitLines(android.graphics.Canvas c)
c -