-
public class PlotController extends VisualBase
Plot controller class.
-
-
Constructor Summary
Constructors Constructor Description PlotController(String jsChart)
-
Method Summary
Modifier and Type Method Description static PlotControllerinstantiate()StringgetJsBase()Baseadd(AnnotationTypes annotationTypeOrConfig)Adds annotation on the plot. Baseadd(String annotationTypeOrConfig)Adds annotation on the plot. Baseadd(AnnotationJSONFormat annotationTypeOrConfig)Adds annotation on the plot. AndrewsPitchforkandrewsPitchfork(String settings)Creates and returns an Andrews Pitchfork annotation. voidcancelDrawing()Cancels current annotation drawing. Ellipseellipse(String settings)Creates and returns an Ellipse annotation. voidenabled()Getter for the enabled state. PlotControllerenabled(Boolean enabled)Setter for the enabled state. FibonacciArcfibonacciArc(String settings)Creates and returns a Fibonacci Arc annotation. FibonacciFanfibonacciFan(String settings)Creates and returns a Fibonacci Fan annotation. FibonacciRetracementfibonacciRetracement(String settings)Creates and returns a Fibonacci Retracement annotation. FibonacciTimezonesfibonacciTimezones(String settings)Creates and returns a Fibonacci Timezones annotation. PlotControllerfromJson(String config)Creates annotations list by JSON config. PlotControllerfromXml(String config)Creates annotations list by XML config. BasegetAnnotationAt(Number index)Returns annotation by index. voidgetAnnotationsCount()Returns annotations count. BasegetSelectedAnnotation()Returns currently selected annotation. HorizontalLinehorizontalLine(String settings)Creates and returns a Horizontal Line annotation. InfiniteLineinfiniteLine(String settings)Creates and returns an Infinite Line annotation. Labellabel(String settings)Creates and returns a Label annotation. Lineline(String settings)Creates and returns a Line annotation. Markermarker(String settings)Creates and returns a Marker annotation. voidprint(PaperSize paperSizeOrOptions, Boolean landscape)Prints all elements on related stage. voidprint(String paperSizeOrOptions, Boolean landscape)Prints all elements on related stage. Rayray(String settings)Creates and returns a Ray annotation. Rectanglerectangle(String settings)Creates and returns a Rectangle annotation. PlotControllerremoveAllAnnotations()Removes all annotations from a plot. voidremoveAllListeners(String type)Removes all listeners from an object. PlotControllerremoveAnnotation(Base annotation)Removes an annotation from a plot by its instance. PlotControllerremoveAnnotationAt(Number index)Removes an annotation from a plot by its index. PlotControllerselect(Base annotation)Selects annotation. BasestartDrawing(AnnotationTypes annotationTypeOrConfig)Starts annotation drawing. BasestartDrawing(String annotationTypeOrConfig)Starts annotation drawing. BasestartDrawing(AnnotationJSONFormat annotationTypeOrConfig)Starts annotation drawing. voidtoJson(Boolean stringify)Return plot annotations configuration as JSON object or string. voidtoXml(Boolean asXmlNode)Return plot annotations configuration as XML string or XMLNode. TrendChanneltrendChannel(String settings)Creates and returns a Trend Channel annotation. Triangletriangle(String settings)Creates and returns a Triangle annotation. voidsetOnClickListener(ListenersInterface.OnClickListener listener)voidsetOnClickListener(ListenersInterface.OnClickListener listener, String type, String ePath)voidunlistenByKey(String key)Removes an event listener which was added with listen() by the key returned by listen() or listenOnce(). PlotControllerunselect()Unselects annotations. VerticalLineverticalLine(String settings)Creates and returns a Vertical Line annotation. voidzIndex()Getter for the Z-index of the element. PlotControllerzIndex(Number zIndex)Setter for the Z-index of the element. Layercontainer()Getter for the container. PlotControllercontainer(Layer element)Setter for the container. PlotControllercontainer(Stage element)Setter for the container. PlotControllercontainer(String element)Setter for the container. RectparentBounds()Getter for the parent bounds. PlotControllerparentBounds(Rect bounds)Setter for the parent bounds using single value. PlotControllerparentBounds(String bounds)Setter for the parent bounds using single value. PlotControllerparentBounds(Number bounds)Setter for the parent bounds using single value. PlotControllerparentBounds(Number left, Number top, Number width, Number height)Setter for the parent bounds using several values. -
Methods inherited from class com.anychart.core.VisualBase
container, container, container, enabled, instantiate, parentBounds, parentBounds, parentBounds, parentBounds, zIndex -
Methods inherited from class com.anychart.core.Base
instantiate -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
PlotController
PlotController(String jsChart)
-
-
Method Detail
-
instantiate
static PlotController instantiate()
-
add
Base add(AnnotationTypes annotationTypeOrConfig)
Adds annotation on the plot.
-
add
Base add(AnnotationJSONFormat annotationTypeOrConfig)
Adds annotation on the plot.
-
andrewsPitchfork
AndrewsPitchfork andrewsPitchfork(String settings)
Creates and returns an Andrews Pitchfork annotation.
-
cancelDrawing
void cancelDrawing()
Cancels current annotation drawing.
-
enabled
void enabled()
Getter for the enabled state.
-
enabled
PlotController enabled(Boolean enabled)
Setter for the enabled state.
-
fibonacciArc
FibonacciArc fibonacciArc(String settings)
Creates and returns a Fibonacci Arc annotation.
-
fibonacciFan
FibonacciFan fibonacciFan(String settings)
Creates and returns a Fibonacci Fan annotation.
-
fibonacciRetracement
FibonacciRetracement fibonacciRetracement(String settings)
Creates and returns a Fibonacci Retracement annotation.
-
fibonacciTimezones
FibonacciTimezones fibonacciTimezones(String settings)
Creates and returns a Fibonacci Timezones annotation.
-
fromJson
PlotController fromJson(String config)
Creates annotations list by JSON config.
-
fromXml
PlotController fromXml(String config)
Creates annotations list by XML config.
-
getAnnotationAt
Base getAnnotationAt(Number index)
Returns annotation by index.
-
getAnnotationsCount
void getAnnotationsCount()
Returns annotations count.
-
getSelectedAnnotation
Base getSelectedAnnotation()
Returns currently selected annotation.
-
horizontalLine
HorizontalLine horizontalLine(String settings)
Creates and returns a Horizontal Line annotation.
-
infiniteLine
InfiniteLine infiniteLine(String settings)
Creates and returns an Infinite Line annotation.
-
print
void print(PaperSize paperSizeOrOptions, Boolean landscape)
Prints all elements on related stage.
-
print
void print(String paperSizeOrOptions, Boolean landscape)
Prints all elements on related stage.
-
removeAllAnnotations
PlotController removeAllAnnotations()
Removes all annotations from a plot.
-
removeAllListeners
void removeAllListeners(String type)
Removes all listeners from an object. You can also optionally remove listeners of some particular type.
-
removeAnnotation
PlotController removeAnnotation(Base annotation)
Removes an annotation from a plot by its instance.
-
removeAnnotationAt
PlotController removeAnnotationAt(Number index)
Removes an annotation from a plot by its index.
-
select
PlotController select(Base annotation)
Selects annotation.
-
startDrawing
Base startDrawing(AnnotationTypes annotationTypeOrConfig)
Starts annotation drawing.Note: Works only after draw and draw is called.
-
startDrawing
Base startDrawing(String annotationTypeOrConfig)
Starts annotation drawing.Note: Works only after draw and draw is called.
-
startDrawing
Base startDrawing(AnnotationJSONFormat annotationTypeOrConfig)
Starts annotation drawing.Note: Works only after draw and draw is called.
-
toJson
void toJson(Boolean stringify)
Return plot annotations configuration as JSON object or string.
-
trendChannel
TrendChannel trendChannel(String settings)
Creates and returns a Trend Channel annotation.
-
setOnClickListener
void setOnClickListener(ListenersInterface.OnClickListener listener)
-
setOnClickListener
void setOnClickListener(ListenersInterface.OnClickListener listener, String type, String ePath)
-
unlistenByKey
void unlistenByKey(String key)
Removes an event listener which was added with listen() by the key returned by listen() or listenOnce().
-
unselect
PlotController unselect()
Unselects annotations.
-
verticalLine
VerticalLine verticalLine(String settings)
Creates and returns a Vertical Line annotation.
-
zIndex
void zIndex()
Getter for the Z-index of the element.
-
zIndex
PlotController zIndex(Number zIndex)
Setter for the Z-index of the element.
-
container
PlotController container(Layer element)
Setter for the container.
-
container
PlotController container(Stage element)
Setter for the container.
-
container
PlotController container(String element)
Setter for the container.
-
parentBounds
Rect parentBounds()
Getter for the parent bounds. Bounds that would be used in case of percent size calculations. Expects pixel values only.
-
parentBounds
PlotController parentBounds(Rect bounds)
Setter for the parent bounds using single value. Bounds that would be used in case of percent size calculations. Expects pixel values only.
-
parentBounds
PlotController parentBounds(String bounds)
Setter for the parent bounds using single value. Bounds that would be used in case of percent size calculations. Expects pixel values only.
-
parentBounds
PlotController parentBounds(Number bounds)
Setter for the parent bounds using single value. Bounds that would be used in case of percent size calculations. Expects pixel values only.
-
parentBounds
PlotController parentBounds(Number left, Number top, Number width, Number height)
Setter for the parent bounds using several values. Bounds that would be used in case of percent size calculations. Expects pixel values only.
-
-
-
-