public class LimitLine extends ComponentBase
| Modifier and Type | Class and Description |
|---|---|
static class |
LimitLine.LimitLabelPosition
enum that indicates the position of the LimitLine label
|
mEnabled, mTextColor, mTextSize, mTypeface, mXOffset, mYOffset| Constructor and Description |
|---|
LimitLine(float limit)
Constructor with limit.
|
LimitLine(float limit,
java.lang.String label)
Constructor with limit and label.
|
| Modifier and Type | Method and Description |
|---|---|
void |
disableDashedLine()
Disables the line to be drawn in dashed mode.
|
void |
enableDashedLine(float lineLength,
float spaceLength,
float phase)
Enables the line to be drawn in dashed mode, e.g.
|
android.graphics.DashPathEffect |
getDashPathEffect()
returns the DashPathEffect that is set for this LimitLine
|
java.lang.String |
getLabel()
Returns the label that is drawn next to the limit line.
|
LimitLine.LimitLabelPosition |
getLabelPosition()
Returns the position of the LimitLine label (value).
|
float |
getLimit()
Returns the limit that is set for this line.
|
int |
getLineColor()
Returns the color that is used for this LimitLine
|
float |
getLineWidth()
returns the width of limit line
|
android.graphics.Paint.Style |
getTextStyle()
Returns the color of the value-text that is drawn next to the LimitLine.
|
boolean |
isDashedLineEnabled()
Returns true if the dashed-line effect is enabled, false if not.
|
void |
setLabel(java.lang.String label)
Sets the label that is drawn next to the limit line.
|
void |
setLabelPosition(LimitLine.LimitLabelPosition pos)
Sets the position of the LimitLine value label (either on the right or on
the left edge of the chart).
|
void |
setLineColor(int color)
Sets the linecolor for this LimitLine.
|
void |
setLineWidth(float width)
set the line width of the chart (min = 0.2f, max = 12f); default 2f NOTE:
thinner line == better performance, thicker line == worse performance
|
void |
setTextStyle(android.graphics.Paint.Style style)
Sets the color of the value-text that is drawn next to the LimitLine.
|
getTextColor, getTextSize, getTypeface, getXOffset, getYOffset, isEnabled, setEnabled, setTextColor, setTextSize, setTypeface, setXOffset, setYOffsetpublic LimitLine(float limit)
limit - - the position (the value) on the y-axis (y-value) or x-axis
(xIndex) where this line should appearpublic LimitLine(float limit,
java.lang.String label)
limit - - the position (the value) on the y-axis (y-value) or x-axis
(xIndex) where this line should appearlabel - - provide "" if no label is requiredpublic float getLimit()
public void setLineWidth(float width)
width - public float getLineWidth()
public void setLineColor(int color)
color - public int getLineColor()
public void enableDashedLine(float lineLength,
float spaceLength,
float phase)
lineLength - the length of the line piecesspaceLength - the length of space inbetween the piecesphase - offset, in degrees (normally, use 0)public void disableDashedLine()
public boolean isDashedLineEnabled()
public android.graphics.DashPathEffect getDashPathEffect()
public void setTextStyle(android.graphics.Paint.Style style)
style - public android.graphics.Paint.Style getTextStyle()
public void setLabelPosition(LimitLine.LimitLabelPosition pos)
pos - public LimitLine.LimitLabelPosition getLabelPosition()
public void setLabel(java.lang.String label)
label - public java.lang.String getLabel()