class anychart.core.annotations.TrendChannel Improve this Doc
Extends: anychart.core.annotations.Base
Trend Channel 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. |
Interactivity | |
allowEdit() | Interactivity settings. |
Size and Position | |
hoverGap() | Hover gap settings. |
secondValueAnchor() | Second value anchor settings |
secondXAnchor() | Second X anchor settings |
thirdValueAnchor() | Third value anchor settings |
thirdXAnchor() | Third X anchor settings |
valueAnchor() | Value anchor settings |
xAnchor() | X anchor settings |
Methods Description
allowEdit
Returns:
boolean - Interactivity settings.var currentAllowEdit = annotation.allowEdit();
Params:
Name | Type | Description |
---|---|---|
value | * | Whether to disable the interactivity in the annotation. If set to false, the interactivity is disabled in the annotation. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
color
Returns:
string - The annotation color.var color = annotation.color();
Learn more about coloring.
Params:
Name | Type | Description |
---|---|---|
value | string | Color as a string. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
fill
Returns:
anychart.graphics.vector.Fill - The annotation fill color.var currentFill = annotation.fill();
Params:
Name | Type | Description |
---|---|---|
value | anychart.graphics.vector.Fill | Color as an array or a string. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
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.TrendChannel - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
color | string | Color as a string. |
opacity | number | Color opacity. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
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.TrendChannel - Self instance for method chaining.Try it:
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.TrendChannel - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
imageSettings | anychart.graphics.vector.Fill | Object with settings. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
getChart
Returns:
anychart.core.SeparateChart - Chart.Try it:
getPlot
Returns:
anychart.core.stock.Plot - Stock plot.Try it:
getType
hatchFill
Returns:
anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function - Hatch fill settings.var currentHatchFill = annotation.hatchFill();
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.TrendChannel - Self instance for method chaining.Try it:
hoverFill
Returns:
anychart.graphics.vector.Fill - The hover fill color.var currentHoverFill = annotation.hoverFill();
Params:
Name | Type | Description |
---|---|---|
value | anychart.graphics.vector.Fill | Color as an array or a string. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
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.TrendChannel - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
color | string | Color as a string. |
opacity | number | Color opacity. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
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.TrendChannel - Self instance for method chaining.Try it:
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.TrendChannel - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
imageSettings | anychart.graphics.vector.Fill | Object with settings. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
hoverGap
Returns:
number - The hover gap value.var currentHoverGap = annotation.hoverGap();
The contour size around annotation.
Params:
Name | Type | Description |
---|---|---|
value | * | Value to set. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
hoverHatchFill
Returns:
anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function - Hover hatch fill settings.var currentHoverHatchFill = annotation.hoverHatchFill();
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.TrendChannel - Self instance for method chaining.Try it:
hoverMarkers
- null/boolean - disable or enable annotation hover markers.
- object - sets annotation hover markers settings.
- string - sets annotation hover markers type.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | Object | boolean | null | string | false | Data markers settings. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.hoverStroke
Returns:
anychart.graphics.vector.Stroke - Hover stroke settings.var currentHoverStroke = annotation.hoverStroke();
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.TrendChannel - Self instance for method chaining.Try it:
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.TrendChannel - Self instance for method chaining.Try it:
markers
- null/boolean - disable or enable annotation markers.
- object - sets annotation markers settings.
- string - sets annotation markers type.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | Object | boolean | null | string | false | Data markers settings. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.secondValueAnchor
Returns:
* - The second value anchor.var controller = chart.annotations(); var annotation = controller.trendChannel(); var currentSecondValueAnchor = annotation.secondValueAnchor();
Params:
Name | Type | Description |
---|---|---|
Second | * | value anchor to set. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
secondXAnchor
Returns:
* - The second X anchor.var controller = chart.annotations(); var annotation = controller.trendChannel(); var currentSecondXAnchor = annotation.secondXAnchor();
Params:
Name | Type | Description |
---|---|---|
Second | * | X anchor to set. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
selectFill
Returns:
anychart.graphics.vector.Fill - The select fill color.var currentSelectFill = annotation.selectFill();
Params:
Name | Type | Description |
---|---|---|
value | anychart.graphics.vector.Fill | Color as an array or a string. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
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.TrendChannel - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
color | string | Color as a string. |
opacity | number | Color opacity. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
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.TrendChannel - Self instance for method chaining.Try it:
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.TrendChannel - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
imageSettings | anychart.graphics.vector.Fill | Object with settings. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
selectHatchFill
Returns:
anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function - Select hatch fill settings.var currentSelectHatchFill = annotation.selectHatchFill();
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.TrendChannel - Self instance for method chaining.Try it:
selectMarkers
- null/boolean - disable or enable annotation select markers.
- object - sets annotation select markers settings.
- string - sets annotation select markers type.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | Object | boolean | null | string | false | Data markers settings. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.selectStroke
Returns:
anychart.graphics.vector.Stroke - Select stroke settings.var currentSelectStroke = annotation.selectStroke();
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.TrendChannel - Self instance for method chaining.Try it:
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.TrendChannel - Self instance for method chaining.Try it:
stroke
Returns:
anychart.graphics.vector.Stroke - Stroke settings.var currentAnnotationStroke = annotation.stroke();
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.TrendChannel - Self instance for method chaining.Try it:
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.TrendChannel - Self instance for method chaining.Try it:
thirdValueAnchor
Returns:
* - The third value anchor.var controller = chart.annotations(); var annotation = controller.trendChannel(); var currentThirdValueAnchor = annotation.thirdValueAnchor();
Params:
Name | Type | Description |
---|---|---|
Third | * | value anchor to set. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
thirdXAnchor
Returns:
* - The third X anchor.var controller = chart.annotations(); var annotation = controller.trendChannel(); var currentThirdXAnchor = annotation.thirdXAnchor();
Params:
Name | Type | Description |
---|---|---|
Third | * | X anchor to set. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
valueAnchor
Returns:
* - The value anchor.var controller = chart.annotations(); var annotation = controller.trendChannel(); var currentValueAnchor = annotation.valueAnchor();
Params:
Name | Type | Description |
---|---|---|
value | * | Value anchor to set. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
xAnchor
Returns:
* - The X anchor.var controller = chart.annotations(); var annotation = controller.trendChannel(); var currentXAnchor = annotation.xAnchor();
Params:
Name | Type | Description |
---|---|---|
value | * | X anchor to set. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
xScale
Returns:
anychart.scales.Ordinal | anychart.scales.Linear | anychart.scales.Logarithmic | anychart.scales.StockScatterDateTime - Default scale value.Try it:
Params:
Name | Type | Description |
---|---|---|
value | anychart.scales.Base | anychart.scales.StockScatterDateTime | Value to set |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it:
yScale
Params:
Name | Type | Description |
---|---|---|
value | anychart.scales.Base | Y-scale to set. |
Returns:
anychart.core.annotations.TrendChannel - Self instance for method chaining.Try it: