Top
You are looking at an outdated 7.13.1 version of this document. Switch to the 8.0.1 version to see the up to date information.

class anychart.core.annotations.Ellipse Improve this Doc

Extends: anychart.core.annotations.Base

Ellipse annotation.

Methods Overview

Specific settings
getPlot()Returns the plot on which the annotation is drawn.
getType()Returns annotation type.
hoverMarkers()Hover markers settings.
markers()Markers settings.
selectMarkers()Select markers settings.
Axes and Scales
xScale()X-scale settings
yScale()Y-scale settings
Charts
getChart()Returns the chart on which the annotation is drawn.
Coloring
color()Color settings.
fill()Fill settings.
hatchFill()Hatch fill settings.
hoverFill()Hover fill settings.
hoverHatchFill()Hover hatch fill settings.
hoverStroke()Hover stroke settings.
selectFill()Select fill settings.
selectHatchFill()Select hatch fill settings.
selectStroke()Select stroke settings.
stroke()Stroke settings.
Size and Position
hoverGap()Hover gap settings.
secondValueAnchor()Second value anchor settings
secondXAnchor()Second X anchor settings
valueAnchor()Value anchor settings
xAnchor()X anchor settings

Methods Description

color

Getter for the annotation color.

Returns:

string - The annotation color.
See listing.
var color = annotation.color();
Setter for the annotation color.

Params:

Name Type Description
value string Color as an object or a string.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

fill

Getter for the annotation fill color.

Returns:

anychart.graphics.vector.Fill - The annotation fill color.
See listing.
var currentFill = annotation.fill();
Setter for fill settings using an array or a string. Learn more about coloring.

Params:

Name Type Description
value anychart.graphics.vector.Fill Color as an array or a string.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.
Setter for fill settings using function.

Params:

Name Type Default Description
fillFunction function
function() {
 return anychart.color.darken(this.sourceColor);
}
Function that looks like function(){ // this.index - series index. // this.sourceColor - color returned by fill() getter. // this.iterator - series point iterator. return fillValue; // type anychart.graphics.vector.Fill }.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

Fill color with opacity.

Params:

Name Type Description
color string Color as a string.
opacity number Color opacity.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

Linear gradient fill. Learn more about coloring.

Params:

Name Type Description
keys Array.<(anychart.graphics.vector.GradientKey|string)> Gradient keys.
angle number Gradient angle.
mode boolean | anychart.graphics.vector.Rect | Object Gradient mode.
opacity number Gradient opacity.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

Radial gradient fill. Learn more about coloring.

Params:

Name Type Description
keys Array.<(anychart.graphics.vector.GradientKey|string)> Color-stop gradient keys.
cx number X ratio of center radial gradient.
cy number Y ratio of center radial gradient.
mode anychart.graphics.math.Rect If defined then userSpaceOnUse mode, else objectBoundingBox.
opacity number Opacity of the gradient.
fx number X ratio of focal point.
fy number Y ratio of focal point.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

Params:

Name Type Description
imageSettings anychart.graphics.vector.Fill Object with settings.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

getChart

Returns the chart on which the annotation is drawn.

Returns:

anychart.core.SeparateChart - Chart.

Try it:

getPlot

Returns the plot on which the annotation is drawn.

Returns:

anychart.core.stock.Plot - Stock plot.

Try it:

getType

Returns annotation type.

Returns:

anychart.enums.AnnotationTypes string - Annotation type

Try it:

hatchFill

Getter for hatch fill settings.
See listing
var currentHatchFill = annotation.hatchFill();
Setter for hatch fill settings.

Params:

Name Type Default Description
patternFillOrType anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | anychart.graphics.vector.HatchFill.HatchFillType | string | boolean
false
PatternFill or HatchFill instance or type of hatch fill.
color string
Color.
thickness number
Thickness.
size number
Pattern size.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

hoverFill

Getter for the hover fill color.

Returns:

anychart.graphics.vector.Fill - The hover fill color.
See listing
var currentHoverFill = annotation.hoverFill();
Setter for hover fill settings using an array or a string. Learn more about coloring.

Params:

Name Type Description
value anychart.graphics.vector.Fill Color as an array or a string.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.
Setter for hover fill settings using function.

Params:

Name Type Default Description
fillFunction function
function() {
 return anychart.color.darken(this.sourceColor);
}
Function that looks like function(){ // this.index - series index. // this.sourceColor - color returned by fill() getter. // this.iterator - series point iterator. return fillValue; // type anychart.graphics.vector.Fill }.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

Hover fill color with opacity.

Params:

Name Type Description
color string Color as a string.
opacity number Color opacity.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

Linear gradient hover fill. Learn more about coloring.

Params:

Name Type Description
keys Array.<(anychart.graphics.vector.GradientKey|string)> Gradient keys.
angle number Gradient angle.
mode boolean | anychart.graphics.vector.Rect | Object Gradient mode.
opacity number Gradient opacity.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

Radial gradient hover fill. Learn more about coloring.

Params:

Name Type Description
keys Array.<(anychart.graphics.vector.GradientKey|string)> Color-stop gradient keys.
cx number X ratio of center radial gradient.
cy number Y ratio of center radial gradient.
mode anychart.graphics.math.Rect If defined then userSpaceOnUse mode, else objectBoundingBox.
opacity number Opacity of the gradient.
fx number X ratio of focal point.
fy number Y ratio of focal point.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

Image hover fill. Learn more about coloring.

Params:

Name Type Description
imageSettings anychart.graphics.vector.Fill Object with settings.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

hoverGap

Getter for the hover gap.

Returns:

number - The hover gap value.
See listing.
var currentHoverGap = annotation.hoverGap();
Setter for the hover gap.
The contour size around annotation.

Params:

Name Type Description
value * Value to set.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

hoverHatchFill

Getter for hover hatch fill settings.

Returns:

anychart.graphics.vector.PatternFill anychart.graphics.vector.HatchFill function - Hover hatch fill settings.
See listing
var currentHoverHatchFill = annotation.hoverHatchFill();
Setter for hover hatch fill settings.

Params:

Name Type Default Description
patternFillOrType anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | anychart.graphics.vector.HatchFill.HatchFillType | string | boolean
false
PatternFill or HatchFill instance or type of hatch fill.
color string
Color.
thickness number
Thickness.
size number
Pattern size.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

hoverMarkers

Getter for data hover markers.

Returns:

anychart.core.ui.MarkersFactory - Markers instance.

Try it:

Setter for data hover markers.

Params:

Name Type Default Description
value Object | boolean | null | string
false
Data markers settings.

Returns:

anychart.core.annotations.Base - Self instance for method chaining.

hoverStroke

Getter for hover stroke settings.

Returns:

anychart.graphics.vector.Stroke - Hover stroke settings.
See listing.
var currentHoverStroke = annotation.hoverStroke();
Setter for the hover stroke by function.

Params:

Name Type Default Description
strokeFunction function
function() {
 return anychart.color.darken(this.sourceColor);
}
Function that looks like function(){ // this.index - series index. // this.sourceColor - color returned by fill() getter. // this.iterator - series point iterator. return strokeValue; // type anychart.graphics.vector.Stroke or anychart.graphics.vector.ColoredFill }.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

Setter for hover stroke settings. Learn more about stroke settings.

Params:

Name Type Default Description
color anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null
Stroke settings.
thickness number
1
Line thickness.
dashpattern string
Controls the pattern of dashes and gaps used to stroke paths.
lineJoin anychart.graphics.vector.StrokeLineJoin
Line join style.
lineCap anychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

markers

Getter for data markers.

Returns:

anychart.core.ui.MarkersFactory - Markers instance.

Try it:

Setter for data markers.

Params:

Name Type Default Description
value Object | boolean | null | string
false
Data markers settings.

Returns:

anychart.core.annotations.Base - Self instance for method chaining.

secondValueAnchor

Getter for the second value anchor.

Returns:

* - The second value anchor.
See listing.
var controller = chart.annotations();
var annotation = controller.ellipse();
var currentSecondValueAnchor = annotation.secondValueAnchor();
Setter for the second value anchor.

Params:

Name Type Description
Second * value anchor to set.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

secondXAnchor

Getter for the second X anchor.

Returns:

* - The second X anchor.
See listing.
var controller = chart.annotations();
var annotation = controller.ellipse();
var currentSecondXAnchor = annotation.secondXAnchor();
Setter for the second X anchor.

Params:

Name Type Description
Second * X anchor to set.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

selectFill

Getter for the select fill color.

Returns:

anychart.graphics.vector.Fill - The select fill color.
See listing
var currentSelectFill = annotation.selectFill();
Setter for select fill settings using an array or a string. Learn more about coloring.

Params:

Name Type Description
value anychart.graphics.vector.Fill Color as an array or a string.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.
Setter for select fill settings using function.

Params:

Name Type Default Description
fillFunction function
function() {
 return anychart.color.darken(this.sourceColor);
}
Function that looks like function(){ // this.index - series index. // this.sourceColor - color returned by fill() getter. // this.iterator - series point iterator. return fillValue; // type anychart.graphics.vector.Fill }.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

Select fill color with opacity.

Params:

Name Type Description
color string Color as a string.
opacity number Color opacity.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

Linear gradient select fill. Learn more about coloring.

Params:

Name Type Description
keys Array.<(anychart.graphics.vector.GradientKey|string)> Gradient keys.
angle number Gradient angle.
mode boolean | anychart.graphics.vector.Rect | Object Gradient mode.
opacity number Gradient opacity.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

Radial gradient select fill. Learn more about coloring.

Params:

Name Type Description
keys Array.<(anychart.graphics.vector.GradientKey|string)> Color-stop gradient keys.
cx number X ratio of center radial gradient.
cy number Y ratio of center radial gradient.
mode anychart.graphics.math.Rect If defined then userSpaceOnUse mode, else objectBoundingBox.
opacity number Opacity of the gradient.
fx number X ratio of focal point.
fy number Y ratio of focal point.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

Image select fill. Learn more about coloring.

Params:

Name Type Description
imageSettings anychart.graphics.vector.Fill Object with settings.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

selectHatchFill

Getter for select hatch fill settings.

Returns:

anychart.graphics.vector.PatternFill anychart.graphics.vector.HatchFill function - Select hatch fill settings.
See listing
var currentSelectHatchFill = annotation.selectHatchFill();
Setter for select hatch fill settings.

Params:

Name Type Default Description
patternFillOrType anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | anychart.graphics.vector.HatchFill.HatchFillType | string | boolean
false
PatternFill or HatchFill instance or type of hatch fill.
color string
Color.
thickness number
Thickness.
size number
Pattern size.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

selectMarkers

Getter for data select markers.

Returns:

anychart.core.ui.MarkersFactory - Markers instance.

Try it:

Setter for data select markers.

Params:

Name Type Default Description
value Object | boolean | null | string
false
Data markers settings.

Returns:

anychart.core.annotations.Base - Self instance for method chaining.

selectStroke

Getter for select stroke settings.

Returns:

anychart.graphics.vector.Stroke - Select stroke settings.
See listing.
var currentSelectStroke = annotation.selectStroke();
Setter for the select stroke by function.

Params:

Name Type Default Description
strokeFunction function
function() {
 return anychart.color.darken(this.sourceColor);
}
Function that looks like function(){ // this.index - series index. // this.sourceColor - color returned by fill() getter. // this.iterator - series point iterator. return strokeValue; // type anychart.graphics.vector.Stroke or anychart.graphics.vector.ColoredFill }.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

Setter for select stroke settings. Learn more about stroke settings.

Params:

Name Type Default Description
color anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null
Stroke settings.
thickness number
1
Line thickness.
dashpattern string
Controls the pattern of dashes and gaps used to stroke paths.
lineJoin anychart.graphics.vector.StrokeLineJoin
Line join style.
lineCap anychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

stroke

Getter for annotation stroke settings.

Returns:

anychart.graphics.vector.Stroke - The current stroke settings.
See listing.
var currentAnnotationStroke = annotation.stroke();
Setter for the annotation stroke by function.

Params:

Name Type Default Description
strokeFunction function
function() {
 return anychart.color.darken(this.sourceColor);
}
Function that looks like function(){ // this.index - series index. // this.sourceColor - color returned by fill() getter. // this.iterator - series point iterator. return strokeValue; // type anychart.graphics.vector.Stroke or anychart.graphics.vector.ColoredFill }.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

Setter for annotation stroke settings. Learn more about stroke settings.

Params:

Name Type Default Description
color anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null
Stroke settings.
thickness number
1
Line thickness.
dashpattern string
Controls the pattern of dashes and gaps used to stroke paths.
lineJoin anychart.graphics.vector.StrokeLineJoin
Line join style.
lineCap anychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

valueAnchor

Getter for the value anchor.

Returns:

* - The value anchor.
See listing.
var controller = chart.annotations();
var annotation = controller.ellipse();
var currentValueAnchor = annotation.valueAnchor();
Setter for the value anchor.

Params:

Name Type Description
value * Value anchor to set.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

xAnchor

Getter for the X anchor.

Returns:

* - The X anchor.
See listing.
var controller = chart.annotations();
var annotation = controller.ellipse();
var currentXAnchor = annotation.xAnchor();
Setter for the X anchor.

Params:

Name Type Description
value * X anchor to set.

Returns:

anychart.core.annotations.Ellipse - Self instance for method chaining.

Try it:

xScale

Getter for the X-scale.

Try it:

Setter for the X-scale.

Params:

Name Type Description
value anychart.scales.Base | anychart.scales.StockScatterDateTime Value to set

Returns:

anychart.core.annotations.Base - Self instance for method chaining.

Try it:

yScale

Getter for the Y-scale.

Returns:

anychart.scales.Base - Default scale value.

Try it:

Setter for the Y-scale.

Params:

Name Type Description
value anychart.scales.Base Y-scale to set.

Returns:

anychart.core.annotations.Base - Self instance for method chaining.

Try it: