public final class LineAnnotation extends AbstractAnnotation
| Modifier and Type | Field and Description |
|---|---|
static IsColor |
DEFAULT_BORDER_COLOR
Default line annotation border color, rgb(54, 162, 235).
|
static String |
DEFAULT_BORDER_COLOR_AS_STRING
Default line annotation border color as string, rgb(54, 162, 235).
|
static int |
DEFAULT_BORDER_WIDTH
Default line annotation border width, 2.
|
static String |
DEFAULT_ID
Default line annotation ID, "a-line-1".
|
static LineMode |
DEFAULT_MODE
Default line annotation mode,
LineMode.VERTICAL. |
| Constructor and Description |
|---|
LineAnnotation()
Creates a line annotation to be added to an
AnnotationOptions instance. |
LineAnnotation(IsChart chart)
Creates a line annotation to be added to an
AnnotationOptions instance, relating to chart instance for default. |
| Modifier and Type | Method and Description |
|---|---|
String |
getBorderColorAsString()
Returns the color of the border of annotation.
|
List<Integer> |
getBorderDash()
Returns the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of
lines and gaps which describe the pattern.
|
int |
getBorderDashOffset()
Returns the line dash pattern offset or "phase".
|
int |
getBorderWidth()
Returns the width of the border in pixels.
|
Date |
getEndValueAsDate()
Returns the data value at which the line draw should end.
|
double |
getEndValueAsDouble()
Returns the data value at which the line draw should end.
|
String |
getEndValueAsString()
Returns the data value at which the line draw should end.
|
LineLabel |
getLabel()
Returns the label on the line.
|
LineMode |
getMode()
Returns the orientation (horizontal or vertical) of the line.
|
String |
getScaleID()
Returns the ID of the scale to bind onto.
|
Date |
getValueAsDate()
Returns the data value to draw the line at.
|
double |
getValueAsDouble()
Returns the data value to draw the line at.
|
String |
getValueAsString()
Returns the data value to draw the line at.
|
void |
setBorderDash(int... borderDash)
Sets the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines
and gaps which describe the pattern.
|
void |
setBorderDashOffset(int borderDashOffset)
Sets the line dash pattern offset or "phase".
|
void |
setEndValue(Date endValue)
Sets the data value at which the line draw should end.
|
void |
setEndValue(double endValue)
Sets the data value at which the line draw should end.
|
void |
setEndValue(String endValue)
Sets the data value at which the line draw should end.
|
void |
setMode(LineMode mode)
Sets the orientation (horizontal or vertical) of the line.
|
void |
setScaleID(String scaleId)
Sets the ID of the scale to bind onto.
|
void |
setValue(Date value)
Sets the data value to draw the line at.
|
void |
setValue(double value)
Sets the data value to draw the line at.
|
void |
setValue(String value)
Sets the data value to draw the line at.
|
getBorderColor, getClickCallback, getContextMenuCallback, getDoubleClickCallback, getDrawTime, getMouseDownCallback, getMouseEnterCallback, getMouseLeaveCallback, getMouseMoveCallback, getMouseOutCallback, getMouseOverCallback, getMouseUpCallback, getName, getType, getWheelCallback, setBorderColor, setBorderColor, setBorderWidth, setClickCallback, setContextMenuCallback, setDoubleClickCallback, setDrawTime, setMouseDownCallback, setMouseEnterCallback, setMouseLeaveCallback, setMouseMoveCallback, setMouseOutCallback, setMouseOverCallback, setMouseUpCallback, setName, setWheelCallbackgetId, getPluginId, loadGlobalsPluginOptions, store, store, store, storecheckValue, empty, getArrayValue, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, keys, remove, remove, removeIfExists, setArrayValue, setArrayValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, typepublic static final String DEFAULT_ID
public static final IsColor DEFAULT_BORDER_COLOR
public static final String DEFAULT_BORDER_COLOR_AS_STRING
public static final int DEFAULT_BORDER_WIDTH
public static final LineMode DEFAULT_MODE
LineMode.VERTICAL.public LineAnnotation()
AnnotationOptions instance.public LineAnnotation(IsChart chart)
AnnotationOptions instance, relating to chart instance for default.chart - chart instance related to the plugin optionspublic LineLabel getLabel()
public String getBorderColorAsString()
public int getBorderWidth()
public void setBorderDash(int... borderDash)
borderDash - the line dash pattern used when stroking lines, using an array of values which specify alternating
lengths of lines and gaps which describe the pattern.public List<Integer> getBorderDash()
public void setBorderDashOffset(int borderDashOffset)
borderDashOffset - the line dash pattern offset or "phase".public int getBorderDashOffset()
public void setMode(LineMode mode)
mode - the orientation (horizontal or vertical) of the linepublic LineMode getMode()
public void setScaleID(String scaleId)
scaleId - the ID of the scale to bind ontopublic String getScaleID()
public void setValue(String value)
value - the data value to draw the line atpublic void setValue(double value)
value - the data value to draw the line atpublic void setValue(Date value)
value - the data value to draw the line atpublic String getValueAsString()
public double getValueAsDouble()
public Date getValueAsDate()
public void setEndValue(String endValue)
endValue - the data value at which the line draw should endpublic void setEndValue(double endValue)
endValue - the data value at which the line draw should endpublic void setEndValue(Date endValue)
endValue - the data value at which the line draw should endpublic String getEndValueAsString()
public double getEndValueAsDouble()
public Date getEndValueAsDate()