public class LineRenderer extends ChartSeriesRenderer
ChartSeriesRenderer
and is used for rendering lines in the chart series.Modifier and Type | Field and Description |
---|---|
ChartLayoutContext |
layoutContext
Context storing info about the currently rendered chart layout.
|
static int |
STROKE_COLOR_PROPERTY_KEY |
static int |
STROKE_THICKNESS_PROPERTY_KEY |
Constructor and Description |
---|
LineRenderer()
Creates a new instance of the
LineRenderer class. |
Modifier and Type | Method and Description |
---|---|
void |
applyPalette(ChartPalette palette)
Applies the color of the current palette entry to the current renderer implementation.
|
float[] |
getDashArray()
Gets the current collection of dashes.
|
DataPointIndicatorRenderer |
getDataPointIndicatorRenderer()
Gets the current
DataPointIndicatorRenderer instance used for rendering the data point indicators. |
Paint |
getLinePaint() |
int |
getPointIndicatorColor()
Gets the point indicator color.
|
int |
getPointIndicatorStrokeColor()
Gets the color of the indicator stroke.
|
int |
getStrokeColor()
Gets the id of the stroke color.
|
float |
getStrokeThickness()
Gets the current width of the stroke.
|
boolean |
hitTest(PointF point,
float lineTouchSize)
Determines if the figure drawn by the renderer contains the given point.
|
void |
setDashArray(float[] dashArray)
Sets the current collection of dashes.
|
void |
setDataPointIndicatorRenderer(DataPointIndicatorRenderer renderer)
Sets the current data point indicator renderer.
|
void |
setModel(ChartSeriesModel model)
Sets the current chart series model.
|
void |
setPointIndicatorColor(int color)
Sets the point indicator color.
|
void |
setPointIndicatorStrokeColor(int color)
Sets the current point indicator stroke color.
|
void |
setStrokeColor(int value)
Sets the id of the stroke color.
|
void |
setStrokePaint(Paint paint) |
void |
setStrokeThickness(float value)
Sets the current width of the stroke.
|
dataPointSegments, prepare, render
getValue, resetPropertyValue, setValue, setValue
public static final int STROKE_COLOR_PROPERTY_KEY
public static final int STROKE_THICKNESS_PROPERTY_KEY
public ChartLayoutContext layoutContext
ChartLayoutContext
public LineRenderer()
LineRenderer
class.public DataPointIndicatorRenderer getDataPointIndicatorRenderer()
DataPointIndicatorRenderer
instance used for rendering the data point indicators.public void setDataPointIndicatorRenderer(DataPointIndicatorRenderer renderer)
renderer
- the new renderer.public void setModel(ChartSeriesModel model)
model
- the new model.ChartSeriesModel
public int getStrokeColor()
public void setStrokeColor(int value)
value
- the new color id.public Paint getLinePaint()
public void setStrokePaint(Paint paint)
public int getPointIndicatorStrokeColor()
public void setPointIndicatorStrokeColor(int color)
color
- the new color.public int getPointIndicatorColor()
public void setPointIndicatorColor(int color)
color
- the new color.public float[] getDashArray()
public void setDashArray(float[] dashArray)
dashArray
- the new dash collection.public float getStrokeThickness()
public void setStrokeThickness(float value)
value
- the new width.public boolean hitTest(PointF point, float lineTouchSize)
point
- The point to test.public void applyPalette(ChartPalette palette)
ChartSeriesRenderer
applyPalette
in class ChartSeriesRenderer