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.Candlestick Improve this Doc

Extends: anychart.core.cartesian.series.OHLC

Define Candlestick series type.
Note: Use method anychart.charts.Cartesian#candlestick to get this series.

Methods Overview

Miscellaneous
fallingFill()Getter for current falling series fill color.
fallingHatchFill()Getter for current falling hatch fill settings.
hoverFallingFill()Getter for current series falling fill color on hover state.
hoverFallingHatchFill()Getter for current falling hatch fill settings on hover state.
hoverRisingFill()Getter for current series rising fill color on hover state.
hoverRisingHatchFill()Getter for current rising hatch fill settings on hover state.
risingFill()Getter for current series rising fill color.
risingHatchFill()Getter for current rising hatch fill settings.

Methods Description

fallingFill

Getter for current falling series fill color.

Returns:

anychart.graphics.vector.Fill - The current falling fill color.

Try it:

Sets falling fill settings using an object or a string. Learn more about coloring.

Params:

Name Type Default Description
value anychart.graphics.vector.Fill
null
Color as an object or a string.

Returns:

anychart.core.cartesian.series.Base - Self instance for method chaining.
Sets falling 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.cartesian.series.Candlestick - Self instance for method chaining.

Try it:

Falling fill color with opacity.

Params:

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

Returns:

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

Try it:

Linear gradient falling 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.cartesian.series.Base - Self instance for method chaining.

Try it:

Radial gradient falling 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.cartesian.series.Base - Self instance for method chaining.

Try it:

Image falling fill. Learn more about coloring.

Params:

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

Returns:

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

Try it:

fallingHatchFill

Getter for current falling hatch fill settings.

Returns:

anychart.graphics.vector.PatternFill anychart.graphics.vector.HatchFill function - The current falling hatch fill.

Try it:

Setter for falling hatch fill settings. Learn more about hatch fill settings.

Params:

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

Returns:

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

Try it:

hoverFallingFill

Getter for current series falling fill color on hover state.

Returns:

anychart.graphics.vector.Fill - The current falling fill color.

Try it:

Sets falling fill settings on hover state using an object or a string. Learn more about coloring.

Params:

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

Returns:

anychart.core.cartesian.series.Base - Self instance for method chaining.
Falling fill color on hover state with opacity.

Params:

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

Returns:

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

Try it:

Linear gradient falling fill on hover state. 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.cartesian.series.Base - Self instance for method chaining.

Try it:

Radial gradient falling fill on hover state. 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.cartesian.series.Base - Self instance for method chaining.

Try it:

Image falling fill on hover state. Learn more about coloring.

Params:

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

Returns:

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

Try it:

hoverFallingHatchFill

Getter for current falling hatch fill settings on hover state.

Returns:

anychart.graphics.vector.PatternFill anychart.graphics.vector.HatchFill function - The current falling hatch fill.

Try it:

Setter for falling hatch fill settings on hover state. Learn more about hatch fill settings.

Params:

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

Returns:

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

Try it:

hoverRisingFill

Getter for current series rising fill color on hover state.

Returns:

anychart.graphics.vector.Fill - The current rising fill color.

Try it:

Sets rising fill settings on hover state using an object or a string. Learn more about coloring.

Params:

Name Type Default Description
value anychart.graphics.vector.Fill
null
Color as an object or a string.

Returns:

anychart.core.cartesian.series.Base - Self instance for method chaining.
Sets rising fill settings on hover state 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.cartesian.series.Candlestick - Self instance for method chaining.

Try it:

Rising fill color on hover state with opacity.

Params:

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

Returns:

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

Try it:

Linear gradient rising fill on hover state. 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.cartesian.series.Base - Self instance for method chaining.

Try it:

Radial gradient rising fill on hover state. 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.cartesian.series.Base - Self instance for method chaining.

Try it:

Image rising fill on hover state. Learn more about coloring.

Params:

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

Returns:

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

Try it:

hoverRisingHatchFill

Getter for current rising hatch fill settings on hover state.

Returns:

anychart.graphics.vector.PatternFill anychart.graphics.vector.HatchFill function - The current rising hatch fill.

Try it:

Setter for rising hatch fill settings on hover state. Learn more about hatch fill settings.

Params:

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

Returns:

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

Try it:

risingFill

Getter for current series rising fill color.

Returns:

anychart.graphics.vector.Fill - The current rising fill color.

Try it:

Sets rising fill settings using an object or a string. Learn more about hatch fill settings.

Params:

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

Returns:

anychart.core.cartesian.series.Base - Self instance for method chaining.
Sets rising 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.cartesian.series.Candlestick - Self instance for method chaining.

Try it:

Rising fill color with opacity.

Params:

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

Returns:

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

Try it:

Linear gradient rising 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.cartesian.series.Base - Self instance for method chaining.

Try it:

Radial gradient rising 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.cartesian.series.Base - Self instance for method chaining.

Try it:

Image rising fill. Learn more about coloring.

Params:

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

Returns:

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

Try it:

risingHatchFill

Getter for current rising hatch fill settings.

Returns:

anychart.graphics.vector.PatternFill anychart.graphics.vector.HatchFill function - The current rising hatch fill.

Try it:

Setter for rising hatch fill settings. Learn more about hatch fill settings.

Params:

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

Returns:

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

Try it: