public abstract class DataRenderer extends Renderer
| Modifier and Type | Field and Description |
|---|---|
protected ChartAnimator |
mAnimator
the animator object used to perform animations on the chart data
|
protected android.graphics.Paint |
mDrawPaint |
protected android.graphics.Paint |
mHighlightPaint
paint used for highlighting values
|
protected android.graphics.Paint |
mRenderPaint
main paint object used for rendering
|
protected android.graphics.Paint |
mValuePaint
paint object for drawing values (text representing values of chart
entries)
|
mMaxX, mMinX, mViewPortHandler| Constructor and Description |
|---|
DataRenderer(ChartAnimator animator,
ViewPortHandler viewPortHandler) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyValueTextStyle(DataSet<?> set)
Applies the required styling (provided by the DataSet) to the value-paint
object.
|
abstract void |
drawData(android.graphics.Canvas c)
Draws the actual data in form of lines, bars, ...
|
abstract void |
drawExtras(android.graphics.Canvas c)
Draws any kind of additional information (e.g.
|
abstract void |
drawHighlighted(android.graphics.Canvas c,
Highlight[] indices)
Draws all highlight indicators for the values that are currently highlighted.
|
void |
drawValue(android.graphics.Canvas c,
ValueFormatter formatter,
float value,
Entry entry,
int dataSetIndex,
float x,
float y)
Draws the value of the given entry by using the provided ValueFormatter.
|
abstract void |
drawValues(android.graphics.Canvas c)
Loops over all Entrys and draws their values.
|
android.graphics.Paint |
getPaintHighlight()
Returns the Paint object this renderer uses for drawing highlight
indicators.
|
android.graphics.Paint |
getPaintRender()
Returns the Paint object used for rendering.
|
android.graphics.Paint |
getPaintValues()
Returns the Paint object this renderer uses for drawing the values
(value-text).
|
abstract void |
initBuffers()
Initializes the buffers used for rendering with a new size.
|
calcXBounds, fitsBoundsprotected ChartAnimator mAnimator
protected android.graphics.Paint mRenderPaint
protected android.graphics.Paint mHighlightPaint
protected android.graphics.Paint mDrawPaint
protected android.graphics.Paint mValuePaint
public DataRenderer(ChartAnimator animator, ViewPortHandler viewPortHandler)
public android.graphics.Paint getPaintValues()
public android.graphics.Paint getPaintHighlight()
public android.graphics.Paint getPaintRender()
protected void applyValueTextStyle(DataSet<?> set)
set - public abstract void initBuffers()
public abstract void drawData(android.graphics.Canvas c)
c - public abstract void drawValues(android.graphics.Canvas c)
c - public void drawValue(android.graphics.Canvas c,
ValueFormatter formatter,
float value,
Entry entry,
int dataSetIndex,
float x,
float y)
c - canvasformatter - formatter for custom value-formattingvalue - the value to be drawnentry - the entry the value belongs todataSetIndex - the index of the DataSet the drawn Entry belongs tox - positiony - positionpublic abstract void drawExtras(android.graphics.Canvas c)
c - public abstract void drawHighlighted(android.graphics.Canvas c,
Highlight[] indices)
c - indices - the highlighted values