public class Line
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
UNINITIALIZED |
| Constructor and Description |
|---|
Line() |
Line(Line line) |
Line(java.util.List<PointValue> values) |
| Modifier and Type | Method and Description |
|---|---|
void |
finish() |
int |
getAreaTransparency() |
int |
getColor() |
int |
getDarkenColor() |
LineChartValueFormatter |
getFormatter() |
android.graphics.PathEffect |
getPathEffect() |
int |
getPointColor() |
int |
getPointRadius() |
ValueShape |
getShape() |
int |
getStrokeWidth() |
java.util.List<PointValue> |
getValues() |
boolean |
hasLabels() |
boolean |
hasLabelsOnlyForSelected() |
boolean |
hasLines() |
boolean |
hasPoints() |
boolean |
isCubic() |
boolean |
isFilled() |
boolean |
isSquare() |
Line |
setAreaTransparency(int areaTransparency)
Set area transparency(255 is full opacity) for filled lines
|
Line |
setColor(int color) |
Line |
setCubic(boolean isCubic) |
Line |
setFilled(boolean isFilled) |
Line |
setFormatter(LineChartValueFormatter formatter) |
Line |
setHasLabels(boolean hasLabels) |
Line |
setHasLabelsOnlyForSelected(boolean hasLabelsOnlyForSelected)
Set true if you want to show value labels only for selected value, works best when chart has
isValueSelectionEnabled set to true
Chart.setValueSelectionEnabled(boolean). |
Line |
setHasLines(boolean hasLines) |
Line |
setHasPoints(boolean hasPoints) |
void |
setPathEffect(android.graphics.PathEffect pathEffect)
Set path effect for this line, note: it will slow down drawing, try to not use complicated effects,
DashPathEffect should be safe choice.
|
Line |
setPointColor(int pointColor) |
Line |
setPointRadius(int pointRadius)
Set radius for points for this line.
|
Line |
setShape(ValueShape shape)
Set shape for points, possible values: SQUARE, CIRCLE
|
Line |
setSquare(boolean isSquare) |
Line |
setStrokeWidth(int strokeWidth) |
void |
setValues(java.util.List<PointValue> values) |
void |
update(float scale) |
public static final int UNINITIALIZED
public Line()
public Line(java.util.List<PointValue> values)
public Line(Line line)
public void update(float scale)
public void finish()
public java.util.List<PointValue> getValues()
public void setValues(java.util.List<PointValue> values)
public int getColor()
public Line setColor(int color)
public int getPointColor()
public Line setPointColor(int pointColor)
public int getDarkenColor()
public int getAreaTransparency()
setAreaTransparency(int)public Line setAreaTransparency(int areaTransparency)
areaTransparency - public int getStrokeWidth()
public Line setStrokeWidth(int strokeWidth)
public boolean hasPoints()
public Line setHasPoints(boolean hasPoints)
public boolean hasLines()
public Line setHasLines(boolean hasLines)
public boolean hasLabels()
public Line setHasLabels(boolean hasLabels)
public boolean hasLabelsOnlyForSelected()
setHasLabelsOnlyForSelected(boolean)public Line setHasLabelsOnlyForSelected(boolean hasLabelsOnlyForSelected)
Chart.setValueSelectionEnabled(boolean).public int getPointRadius()
public Line setPointRadius(int pointRadius)
pointRadius - public boolean isCubic()
public Line setCubic(boolean isCubic)
public boolean isSquare()
public Line setSquare(boolean isSquare)
public boolean isFilled()
public Line setFilled(boolean isFilled)
public ValueShape getShape()
setShape(ValueShape)public Line setShape(ValueShape shape)
shape - public android.graphics.PathEffect getPathEffect()
public void setPathEffect(android.graphics.PathEffect pathEffect)
pathEffect - public LineChartValueFormatter getFormatter()
public Line setFormatter(LineChartValueFormatter formatter)