class anychart.core.annotations.ChartController Improve this Doc
Extends: anychart.core.Base
Chart controller class.
Methods Overview
| Specific settings | |
| cancelDrawing() | Cancels current annotation drawing. |
| getSelectedAnnotation() | Returns currently selected annotation. |
| removeAllAnnotations() | Removes all annotations from the chart. |
| removeAnnotation() | Removes one of annotations from plot by its instance. |
| startDrawing() | Starts annotation drawing. |
| Interactivity | |
| select() | Selects annotation. |
| unselect() | Unselects annotations. |
Methods Description
cancelDrawing
Cancels current annotation drawing.
Try it:
getSelectedAnnotation
Returns currently selected annotation.
Returns:
anychart.core.annotations.Base - Annotation instance.Try it:
removeAllAnnotations
Removes all annotations from the chart.
Returns:
anychart.core.annotations.ChartController - Self instance for method chaining.Try it:
removeAnnotation
Removes one of annotations from plot by its instance.
Params:
| Name | Type | Description |
|---|---|---|
| annotation | anychart.core.annotations.Base | Annotation instance to set. |
Returns:
anychart.core.annotations.ChartController - Self instance for method chaining.Try it:
select
Selects annotation.
Params:
| Name | Type | Description |
|---|---|---|
| annotation | anychart.core.annotations.Base | Annotation instance to set. |
Returns:
anychart.core.annotations.ChartController - Self instance for method chaining.Try it:
startDrawing
Starts annotation drawing.
Note: Works only after anychart.charts.Stock#draw is called.
Note: Works only after anychart.charts.Stock#draw is called.
Params:
| Name | Type | Description |
|---|---|---|
| annotationTypeOrConfig | anychart.enums.AnnotationTypes | string | anychart.core.annotations.AnnotationJSONFormat | Type or annotation object. |
Returns:
anychart.core.annotations.Base - Annotation instanceTry it:
unselect
Unselects annotations.
Returns:
anychart.core.annotations.ChartController - Self instance for method chaining.Try it:
