public final class LineAnnotation extends AbstractAnnotation
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BORDER_WIDTH
Default line annotation border width, 2.
|
DEFAULT_ADJUST_SCALE_RANGE, DEFAULT_DISPLAY
Constructor and Description |
---|
LineAnnotation()
Creates a line annotation to be added to an
AnnotationOptions instance.The annotation id is calculated automatically. |
LineAnnotation(AnnotationId id)
Creates a line annotation to be added to an
AnnotationOptions instance, using the ID passed as argument. |
LineAnnotation(AnnotationId id,
IsChart chart)
Creates a line annotation to be added to an
AnnotationOptions instance, using the ID passed as argument.The chart instance, passed as argument, must be the chart where the annotations will be applied and is used to get the whole default options in order to get the default for this object. |
LineAnnotation(String id)
Creates a line annotation to be added to an
AnnotationOptions instance, using the ID passed as argument. |
LineAnnotation(String id,
IsChart chart)
Creates a line annotation to be added to an
AnnotationOptions instance, using the ID passed as argument.The chart instance, passed as argument, must be the chart where the annotations will be applied and is used to get the whole default options in order to get the default for this object. |
Modifier and Type | Method and Description |
---|---|
default AdjustScaleRangeCallback |
getAdjustScaleRangeCallback()
Returns the callback called to set whether the scale range should be adjusted if this annotation is out of range.
|
default String |
getBorderColorAsString()
Returns the color of the border of annotation.
|
default ColorCallback<AnnotationContext> |
getBorderColorCallback()
Returns the callback called to set the color of the border of annotation.
|
default 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.
|
default BorderDashCallback<AnnotationContext> |
getBorderDashCallback()
Returns the callback called to set 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.
|
default double |
getBorderDashOffset()
Returns the line dash pattern offset.
|
default BorderDashOffsetCallback<AnnotationContext> |
getBorderDashOffsetCallback()
Returns the callback called to set the line dash pattern offset.
|
default int |
getBorderWidth()
Returns the width of the border in pixels.
|
default WidthCallback<AnnotationContext> |
getBorderWidthCallback()
Returns the callback called to set the width of the border in pixels.
|
default ClickCallback |
getClickCallback()
Returns the callback called when a "click" event is occurring.
|
default DisplayCallback<AnnotationContext> |
getDisplayCallback()
Returns the callback called to set the display options.
|
default DoubleClickCallback |
getDoubleClickCallback()
Returns the callback called when a "dblclick" event is occurring.
|
default DrawTime |
getDrawTime()
Returns the draw time which defines when the annotations are drawn.
|
default DrawTimeCallback |
getDrawTimeCallback()
Returns the callback called to set the draw time which defines when the annotations are drawn.
|
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.
|
ValueCallback |
getEndValueCallback()
Returns the callback called to set the data value at which the line draw should end.
|
default EnterCallback |
getEnterCallback()
Returns the callback called when a "enter" event is occurring.
|
LineLabel |
getLabel()
Returns the label on the line.
|
default LeaveCallback |
getLeaveCallback()
Returns the callback called when a "leave" event is occurring.
|
ScaleId |
getScaleID()
Returns the ID of the scale to bind onto.
|
default AnnotationType |
getType()
Returns the type of annotation.
|
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.
|
ValueCallback |
getValueCallback()
Returns the callback called to set the left edge of the box, in units along the x axis.
|
default Date |
getXMaxAsDate()
Returns the right edge of the box.
|
Date |
getXMaxAsDate()
Returns the right edge of the box.
|
default double |
getXMaxAsDouble()
Returns the right edge of the box.
|
double |
getXMaxAsDouble()
Returns the right edge of the box.
|
default String |
getXMaxAsString()
Returns the right edge of the box.
|
String |
getXMaxAsString()
Returns the right edge of the box.
|
default ValueCallback |
getXMaxCallback()
Returns the callback called to set the right edge of the box.
|
ValueCallback |
getXMaxCallback()
Returns the callback called to set the right edge of the box.
|
default Date |
getXMinAsDate()
Returns the left edge of the box, in units along the x axis.
|
Date |
getXMinAsDate()
Returns the left edge of the box, in units along the x axis.
|
default double |
getXMinAsDouble()
Returns the left edge of the box, in units along the x axis.
|
double |
getXMinAsDouble()
Returns the left edge of the box, in units along the x axis.
|
default String |
getXMinAsString()
Returns the left edge of the box, in units along the x axis.
|
String |
getXMinAsString()
Returns the left edge of the box, in units along the x axis.
|
default ValueCallback |
getXMinCallback()
Returns the callback called to set the left edge of the box, in units along the x axis.
|
ValueCallback |
getXMinCallback()
Returns the callback called to set the left edge of the box, in units along the x axis.
|
default ScaleId |
getXScaleID()
Returns the ID of the X scale to bind onto.
|
ScaleId |
getXScaleID()
Returns the ID of the X scale to bind onto.
|
default Date |
getYMaxAsDate()
Returns the top edge of the box in units along the y axis.
|
Date |
getYMaxAsDate()
Returns the top edge of the box in units along the y axis.
|
default double |
getYMaxAsDouble()
Returns the top edge of the box in units along the y axis.
|
double |
getYMaxAsDouble()
Returns the top edge of the box in units along the y axis.
|
default String |
getYMaxAsString()
Returns the top edge of the box in units along the y axis.
|
String |
getYMaxAsString()
Returns the top edge of the box in units along the y axis.
|
default ValueCallback |
getYMaxCallback()
Returns the callback called to set the right edge of the box.
|
ValueCallback |
getYMaxCallback()
Returns the callback called to set the top edge of the box in units along the y axis.
|
default Date |
getYMinAsDate()
Returns the bottom edge of the box.
|
Date |
getYMinAsDate()
Returns the bottom edge of the box.
|
default double |
getYMinAsDouble()
Returns the bottom edge of the box.
|
double |
getYMinAsDouble()
Returns the bottom edge of the box.
|
default String |
getYMinAsString()
Returns the bottom edge of the box.
|
String |
getYMinAsString()
Returns the bottom edge of the box.
|
default ValueCallback |
getYMinCallback()
Returns the callback called to set the left edge of the box, in units along the x axis.
|
ValueCallback |
getYMinCallback()
Returns the callback called to set the bottom edge of the box.
|
default ScaleId |
getYScaleID()
Returns the ID of the Y scale to bind onto.
|
ScaleId |
getYScaleID()
Returns the ID of the Y scale to bind onto.
|
default boolean |
isAdjustScaleRange()
Returns
true whether the scale range should be adjusted if this annotation is out of range. |
default boolean |
isDisplay()
Returns
true whether the annotation should be displayed. |
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(NativeCallback valueCallback)
Sets the callback to set 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 |
setEndValue(ValueCallback valueCallback)
Sets the callback to set the data value at which the line draw should end.
|
void |
setScaleID(ScaleId scaleId)
Sets the ID of the scale to bind onto.
|
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(NativeCallback valueCallback)
Sets the callback to set the left edge of the box, in units along the x axis.
|
void |
setValue(String value)
Sets the data value to draw the line at.
|
void |
setValue(ValueCallback valueCallback)
Sets the callback to set the left edge of the box, in units along the x axis.
|
void |
setXMax(Date max)
Sets the right edge of the box.
|
void |
setXMax(double max)
Sets the right edge of the box.
|
void |
setXMax(NativeCallback valueCallback)
Sets the callback to set the right edge of the box.
|
void |
setXMax(String max)
Sets the right edge of the box.
|
void |
setXMax(ValueCallback valueCallback)
Sets the callback to set the right edge of the box.
|
void |
setXMin(Date min)
Sets the left edge of the box, in units along the x axis.
|
void |
setXMin(double min)
Sets the left edge of the box, in units along the x axis.
|
void |
setXMin(NativeCallback valueCallback)
Sets the callback to set the left edge of the box, in units along the x axis.
|
void |
setXMin(String min)
Sets the left edge of the box, in units along the x axis.
|
void |
setXMin(ValueCallback valueCallback)
Sets the callback to set the left edge of the box, in units along the x axis.
|
void |
setXScaleID(ScaleId scaleId)
Sets the ID of the X scale to bind onto.
|
void |
setXScaleID(String scaleId)
Sets the ID of the X scale to bind onto.
|
void |
setYMax(Date max)
Sets the top edge of the box in units along the y axis.
|
void |
setYMax(double max)
Sets the top edge of the box in units along the y axis.
|
void |
setYMax(NativeCallback valueCallback)
Sets the callback to set the top edge of the box in units along the y axis.
|
void |
setYMax(String max)
Sets the top edge of the box in units along the y axis.
|
void |
setYMax(ValueCallback valueCallback)
Sets the callback to set the top edge of the box in units along the y axis.
|
void |
setYMin(Date min)
Sets the bottom edge of the box.
|
void |
setYMin(double min)
Sets the bottom edge of the box.
|
void |
setYMin(NativeCallback valueCallback)
Sets the callback to set the bottom edge of the box.
|
void |
setYMin(String min)
Sets the bottom edge of the box.
|
void |
setYMin(ValueCallback valueCallback)
Sets the callback to set the bottom edge of the box.
|
void |
setYScaleID(ScaleId scaleId)
Sets the ID of the Y scale to bind onto.
|
void |
setYScaleID(String scaleId)
Sets the ID of the Y scale to bind onto.
|
getAdjustScaleRangeCallback, getBorderColor, getBorderColorCallback, getBorderDash, getBorderDashCallback, getBorderDashOffset, getBorderDashOffsetCallback, getBorderWidthCallback, getClickCallback, getDisplayCallback, getDoubleClickCallback, getDrawTime, getDrawTimeCallback, getEnterCallback, getId, getLeaveCallback, getType, isAdjustScaleRange, isDisplay, setAdjustScaleRange, setAdjustScaleRange, setAdjustScaleRange, setBorderColor, setBorderColor, setBorderColor, setBorderColor, setBorderDash, setBorderDash, setBorderDash, setBorderDashOffset, setBorderDashOffset, setBorderDashOffset, setBorderWidth, setBorderWidth, setBorderWidth, setClickCallback, setDisplay, setDisplay, setDisplay, setDoubleClickCallback, setDrawTime, setDrawTime, setDrawTime, setEnterCallback, setLeaveCallback
checkAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
public static final int DEFAULT_BORDER_WIDTH
public LineAnnotation()
AnnotationOptions
instance.AnnotationType.createId()
public LineAnnotation(String id)
AnnotationOptions
instance, using the ID passed as argument.id
- annotation id to apply to the object, as stringpublic LineAnnotation(AnnotationId id)
AnnotationOptions
instance, using the ID passed as argument.id
- annotation id to apply to the objectpublic LineAnnotation(String id, IsChart chart)
AnnotationOptions
instance, using the ID passed as argument.id
- annotation id to apply to the object, as stringchart
- chart instance related to the plugin optionspublic LineAnnotation(AnnotationId id, IsChart chart)
AnnotationOptions
instance, using the ID passed as argument.id
- annotation id to apply to the objectchart
- chart instance related to the plugin optionspublic LineLabel getLabel()
public void setScaleID(String scaleId)
scaleId
- the ID of the scale to bind ontopublic void setScaleID(ScaleId scaleId)
scaleId
- the ID of the scale to bind ontopublic ScaleId 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()
public ValueCallback getValueCallback()
public void setValue(ValueCallback valueCallback)
valueCallback
- to set the left edge of the box, in units along the x axispublic void setValue(NativeCallback valueCallback)
valueCallback
- to set the left edge of the box, in units along the x axispublic ValueCallback getEndValueCallback()
public void setEndValue(ValueCallback valueCallback)
valueCallback
- to set the data value at which the line draw should endpublic void setEndValue(NativeCallback valueCallback)
valueCallback
- to set the data value at which the line draw should endpublic AnnotationType getType()
public ScaleId getXScaleID()
public ScaleId getYScaleID()
public int getBorderWidth()
public String getXMaxAsString()
public double getXMaxAsDouble()
public Date getXMaxAsDate()
public String getXMinAsString()
public double getXMinAsDouble()
public Date getXMinAsDate()
public String getYMaxAsString()
public double getYMaxAsDouble()
public Date getYMaxAsDate()
public String getYMinAsString()
public double getYMinAsDouble()
public Date getYMinAsDate()
public ValueCallback getXMinCallback()
public ValueCallback getXMaxCallback()
public ValueCallback getYMinCallback()
public ValueCallback getYMaxCallback()
public boolean isDisplay()
true
whether the annotation should be displayed.true
whether the annotation should be displayedpublic boolean isAdjustScaleRange()
true
whether the scale range should be adjusted if this annotation is out of range.true
whether the scale range should be adjusted if this annotation is out of rangepublic DrawTime getDrawTime()
public String getBorderColorAsString()
public List<Integer> getBorderDash()
public double getBorderDashOffset()
public EnterCallback getEnterCallback()
public LeaveCallback getLeaveCallback()
public ClickCallback getClickCallback()
public DoubleClickCallback getDoubleClickCallback()
public DrawTimeCallback getDrawTimeCallback()
public DisplayCallback<AnnotationContext> getDisplayCallback()
public ColorCallback<AnnotationContext> getBorderColorCallback()
public WidthCallback<AnnotationContext> getBorderWidthCallback()
public BorderDashCallback<AnnotationContext> getBorderDashCallback()
public BorderDashOffsetCallback<AnnotationContext> getBorderDashOffsetCallback()
public AdjustScaleRangeCallback getAdjustScaleRangeCallback()
public final void setXScaleID(String scaleId)
scaleId
- the ID of the X scale to bind ontopublic final void setXScaleID(ScaleId scaleId)
scaleId
- the ID of the X scale to bind ontopublic final ScaleId getXScaleID()
public final void setXMax(String max)
max
- the right edge of the boxpublic final void setXMax(double max)
max
- the right edge of the boxpublic final void setXMax(Date max)
max
- the right edge of the boxpublic final String getXMaxAsString()
public final double getXMaxAsDouble()
public final Date getXMaxAsDate()
public final void setXMin(String min)
min
- the left edge of the boxpublic final void setXMin(double min)
min
- the left edge of the boxpublic final void setXMin(Date min)
min
- the left edge of the boxpublic final String getXMinAsString()
public final double getXMinAsDouble()
public final Date getXMinAsDate()
public final void setYScaleID(String scaleId)
scaleId
- the ID of the Y scale to bind ontopublic final void setYScaleID(ScaleId scaleId)
scaleId
- the ID of the Y scale to bind ontopublic final ScaleId getYScaleID()
public final void setYMax(String max)
max
- the top edge of the box in units along the y axispublic final void setYMax(double max)
max
- the top edge of the box in units along the y axispublic final void setYMax(Date max)
max
- the top edge of the box in units along the y axispublic final String getYMaxAsString()
public final double getYMaxAsDouble()
public final Date getYMaxAsDate()
public final void setYMin(String min)
min
- the bottom edge of the boxpublic final void setYMin(double min)
min
- the bottom edge of the boxpublic final void setYMin(Date min)
min
- the bottom edge of the boxpublic final String getYMinAsString()
public final double getYMinAsDouble()
public final Date getYMinAsDate()
public final ValueCallback getXMinCallback()
public final void setXMin(ValueCallback valueCallback)
valueCallback
- to set the left edge of the box, in units along the x axispublic final void setXMin(NativeCallback valueCallback)
valueCallback
- to set the left edge of the box, in units along the x axispublic final ValueCallback getXMaxCallback()
public final void setXMax(ValueCallback valueCallback)
valueCallback
- to set the right edge of the boxpublic final void setXMax(NativeCallback valueCallback)
valueCallback
- to set the right edge of the boxpublic final ValueCallback getYMinCallback()
public final void setYMin(ValueCallback valueCallback)
valueCallback
- to set the bottom edge of the boxpublic final void setYMin(NativeCallback valueCallback)
valueCallback
- to set the bottom edge of the boxpublic final ValueCallback getYMaxCallback()
public final void setYMax(ValueCallback valueCallback)
valueCallback
- to set the top edge of the box in units along the y axispublic final void setYMax(NativeCallback valueCallback)
valueCallback
- to set the top edge of the box in units along the y axis