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

class anychart.cartesian.series.OHLC Improve this Doc

Extends: anychart.cartesian.series.WidthBased

Define OHLC series type.
Note: Better for use methods anychart.cartesian.Chart#ohlc.

Methods Overview

Miscellaneous
fallingStroke()Getter for current stroke settings.
hoverFallingStroke()Getter for current stroke settings.
hoverRisingStroke()Getter for current stroke settings.
risingStroke()Getter for current stroke settings.

Methods Description

fallingStroke

Getter for current stroke settings.

Returns:

anychart.graphics.vector.Stroke function - Current stroke settings.
Setter for series stroke by function.

Params:

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

Returns:

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

Try it:

Setter for stroke settings.
Learn more about stroke settings: https://docs.anychart.com/7.1.1/General_settings/Elements_Stroke

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

Try it:

hoverFallingStroke

Getter for current stroke settings.

Returns:

anychart.graphics.vector.Stroke function - Current stroke settings.
Setter for series stroke by function.

Params:

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

Returns:

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

Try it:

Setter for stroke settings.
Learn more about stroke settings: https://docs.anychart.com/7.1.1/General_settings/Elements_Stroke

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

Try it:

hoverRisingStroke

Getter for current stroke settings.

Returns:

anychart.graphics.vector.Stroke function - Current stroke settings.
Setter for series stroke by function.

Params:

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

Returns:

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

Try it:

Setter for stroke settings.
Learn more about stroke settings: https://docs.anychart.com/7.1.1/General_settings/Elements_Stroke

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

Try it:

risingStroke

Getter for current stroke settings.

Returns:

anychart.graphics.vector.Stroke function - Current stroke settings.
Setter for series stroke by function.

Params:

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

Returns:

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

Try it:

Setter for stroke settings.
Learn more about stroke settings: https://docs.anychart.com/7.1.1/General_settings/Elements_Stroke

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

Try it: