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

class anychart.core.cartesian.series.OHLC Improve this Doc

Extends: anychart.core.cartesian.series.WidthBased

Define OHLC series type.
Note: Use method anychart.charts.Cartesian#ohlc to get this series.

Methods Overview

Miscellaneous
fallingStroke()Getter for current falling stroke settings.
hoverFallingStroke()Getter for current falling stroke settings on hover state.
hoverRisingStroke()Getter for current rising stroke settings on hover state.
risingStroke()Getter for current rising stroke settings.

Methods Description

fallingStroke

Getter for current falling stroke settings.

Returns:

anychart.graphics.vector.Stroke function - The current stroke settings.

Try it:

Setter for series falling stroke by 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 strokeValue; // type anychart.graphics.vector.Stroke or anychart.graphics.vector.ColoredFill }.

Returns:

anychart.core.cartesian.series.OHLC - Self instance for method chaining.

Try it:

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

Params:

Name Type Default Description
strokeOrFill anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null
Fill settings or 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.cartesian.series.OHLC - Self instance for method chaining.

Try it:

hoverFallingStroke

Getter for current falling stroke settings on hover state.

Returns:

anychart.graphics.vector.Stroke function - The current stroke settings.

Try it:

Setter for series falling stroke on hover state 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.cartesian.series.OHLC - Self instance for method chaining.

Try it:

Setter for falling stroke on hover state settings. Learn more about stroke settings.

Params:

Name Type Default Description
value 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.cartesian.series.OHLC - Self instance for method chaining.

Try it:

hoverRisingStroke

Getter for current rising stroke settings on hover state.

Returns:

anychart.graphics.vector.Stroke function - The current stroke settings.

Try it:

Setter for series rising stroke on hover state by 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 strokeValue; // type anychart.graphics.vector.Stroke or anychart.graphics.vector.ColoredFill }.

Returns:

anychart.core.cartesian.series.OHLC - Self instance for method chaining.

Try it:

Setter for rising stroke settings on hover state. Learn more about stroke settings.

Params:

Name Type Default Description
strokeOrFill anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null
Fill settings or 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.cartesian.series.OHLC - Self instance for method chaining.

Try it:

risingStroke

Getter for current rising stroke settings.

Returns:

anychart.graphics.vector.Stroke function - The current stroke settings.

Try it:

Setter for series rising 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.cartesian.series.OHLC - Self instance for method chaining.

Try it:

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

Params:

Name Type Default Description
value 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.cartesian.series.OHLC - Self instance for method chaining.

Try it: