class anychart.core.annotations.AndrewsPitchfork Improve this Doc
Extends: anychart.core.annotations.Base
Andrews Pitchfork 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. |
hoverStroke() | Hover stroke 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 |
thirdValueAnchor() | Third value anchor settings |
thirdXAnchor() | Third 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.
Detailed description
Note: color methods sets fill and stroke settings, which means it is not wise to pass
image fill here - stroke doesn't accept image fill.
Learn more about coloring.
Learn more about coloring.
Params:
Name | Type | Description |
---|---|---|
value | string | Color as a string. |
Returns:
anychart.core.annotations.AndrewsPitchfork - 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
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.
The contour size around annotation.
Params:
Name | Type | Description |
---|---|---|
value | * | Value to set. |
Returns:
anychart.core.annotations.AndrewsPitchfork - Self instance for method chaining.Try it:
hoverMarkers
Setter for data hover markers.
Detailed description
Sets chart markers settings depending on parameter type:
- 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.AndrewsPitchfork - Self instance for method chaining.hoverStroke
Getter for hover stroke settings.
Detailed description
This method can be used as getter only if the value has been previously set.
Returns:
anychart.graphics.vector.Stroke - Hover stroke settings. See listing.
var currentAnnotationHoverStroke = annotation.hoverStroke();
Setter for 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.AndrewsPitchfork - 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.AndrewsPitchfork - Self instance for method chaining.Try it:
markers
Setter for data markers.
Detailed description
Sets chart markers settings depending on parameter type:
- 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.AndrewsPitchfork - 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.andrewsPitchfork(); var currentSecondValueAnchor = annotation.secondValueAnchor();
Setter for the second value anchor.
Params:
Name | Type | Description |
---|---|---|
Second | * | value anchor to set. |
Returns:
anychart.core.annotations.AndrewsPitchfork - 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.andrewsPitchfork(); var currentSecondXAnchor = annotation.secondXAnchor();
Setter for the second X anchor.
Params:
Name | Type | Description |
---|---|---|
Second | * | X anchor to set. |
Returns:
anychart.core.annotations.AndrewsPitchfork - Self instance for method chaining.Try it:
selectMarkers
Setter for data select markers.
Detailed description
Sets chart markers settings depending on parameter type:
- 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.AndrewsPitchfork - Self instance for method chaining.selectStroke
Getter for select stroke settings.
Detailed description
This method can be used as getter only if the value has been previously set.
Returns:
anychart.graphics.vector.Stroke - Select stroke settings. See listing.
var currentAnnotationSelectStroke = annotation.selectStroke();
Setter for 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.AndrewsPitchfork - 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.AndrewsPitchfork - Self instance for method chaining.Try it:
stroke
Getter for stroke settings.
Detailed description
This method can be used as getter only if the value has been previously set.
Returns:
anychart.graphics.vector.Stroke - Stroke settings. See listing.
var currentAnnotationStroke = annotation.stroke();
Setter for annotations 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.AndrewsPitchfork - Self instance for method chaining.Try it:
Setter for annotations 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.AndrewsPitchfork - Self instance for method chaining.Try it:
thirdValueAnchor
Getter for the third value anchor.
Returns:
* - The second value anchor. See listing.
var controller = chart.annotations(); var annotation = controller.andrewsPitchfork(); var currentThirdValueAnchor = annotation.thirdValueAnchor();
Setter for the third value anchor.
Params:
Name | Type | Description |
---|---|---|
Third | * | value anchor to set. |
Returns:
anychart.core.annotations.AndrewsPitchfork - Self instance for method chaining.Try it:
thirdXAnchor
Getter for the third X anchor.
Returns:
* - The third X anchor. See listing.
var controller = chart.annotations(); var annotation = controller.andrewsPitchfork(); var currentThirdXAnchor = annotation.thirdXAnchor();
Setter for the third X anchor.
Params:
Name | Type | Description |
---|---|---|
Third | * | X anchor to set. |
Returns:
anychart.core.annotations.AndrewsPitchfork - 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.andrewsPitchfork(); var currentValueAnchor = annotation.valueAnchor();
Setter for the value anchor.
Params:
Name | Type | Description |
---|---|---|
value | * | Value anchor to set. |
Returns:
anychart.core.annotations.AndrewsPitchfork - 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.andrewsPitchfork(); var currentXAnchor = annotation.xAnchor();
Setter for the X anchor.
Params:
Name | Type | Description |
---|---|---|
value | * | X anchor to set. |
Returns:
anychart.core.annotations.AndrewsPitchfork - Self instance for method chaining.Try it:
xScale
Getter for the X-scale.
Returns:
anychart.scales.Ordinal | anychart.scales.Linear | anychart.scales.Logarithmic | anychart.scales.StockScatterDateTime - Default scale value.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.AndrewsPitchfork - Self instance for method chaining.Try it:
yScale
Setter for the Y-scale.
Params:
Name | Type | Description |
---|---|---|
value | anychart.scales.Base | Y-scale to set. |
Returns:
anychart.core.annotations.AndrewsPitchfork - Self instance for method chaining.Try it: