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

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

Extends: anychart.core.cartesian.series.WidthBased

Series for box/whisker chart.

Methods Overview

Miscellaneous
fill()Getter for current fill color.
hatchFill()Getter for current hatch fill settings.
hoverFill()Getter for current series hover fill color.
hoverHatchFill()Getter for current hover hatch fill settings.
hoverMedianStroke()Getter for hover median stroke setting.
hoverOutlierMarkers()Getter for series outlier markers on hover.
hoverStemStroke()Getter for hover stem stroke setting.
hoverStroke()Getter for current hover stroke settings.
hoverWhiskerStroke()Getter for hover whisker stroke setting.
hoverWhiskerWidth()Getter for whisker width settings.
medianStroke()Getter for median stroke setting.
outlierMarkers()Getter for series outlier markers.
stemStroke()Getter for stem stroke setting.
stroke()Getter for current stroke settings.
unhover()Removes hover from the series point or series.
whiskerStroke()Getter for whisker stroke setting.
whiskerWidth()Getter for whisker width settings.

Methods Description

fill

Getter for current fill color.

Returns:

anychart.graphics.vector.Fill - Current fill color.

Try it:

Sets fill settings 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.Box - Self instance for method chaining.
Sets 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.Box - Self instance for method chaining.

Try it:

Fill color with opacity.
Fill as a string or an object.

Params:

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

Returns:

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

Try it:

Linear gradient 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.Box - Self instance for method chaining.

Try it:

Radial gradient 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.Box - Self instance for method chaining.

Try it:

Params:

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

Returns:

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

Try it:

hatchFill

Getter for current hatch fill settings.
Setter for hatch fill settings. Learn more about coloring.

Params:

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

Returns:

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

Try it:

hoverFill

Getter for current series hover fill color.

Returns:

anychart.graphics.vector.Fill - Current hover fill color.
Sets hover 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.Box - Self instance for method chaining.
Sets hover 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 hoverFillValue; // type anychart.graphics.vector.Fill }.

Returns:

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

Try it:

Hover fill color with opacity.
Fill as a string or an object.

Params:

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

Returns:

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

Try it:

Linear gradient hover 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.Box - Self instance for method chaining.

Try it:

Radial gradient hover 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.Box - Self instance for method chaining.

Try it:

Image hover fill. Learn more about coloring.

Params:

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

Returns:

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

Try it:

hoverHatchFill

Getter for current hover hatch fill settings.

Returns:

anychart.graphics.vector.PatternFill anychart.graphics.vector.HatchFill function - Current hover hatch fill.
Setter for hover hatch fill settings. Learn more about coloring.

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.Box - Self instance for method chaining.

Try it:

hoverMedianStroke

Getter for hover median stroke setting.

Returns:

anychart.graphics.vector.Stroke function - Current hover median stroke setting.

Try it:

Setter for hover median stroke by function.

Params:

Name Type Default Description
strokeOrFill 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.Box - Self instance for method chaining.

Try it:

Setter for hover median stroke settings. Learn more about coloring.

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.Box - Self instance for method chaining.

Try it:

hoverOutlierMarkers

Getter for series outlier markers on hover.

Returns:

anychart.core.ui.MarkersFactory - Markers instance.

Try it:

Setter for series data markers on hover.

Params:

Name Type Description
value Object | boolean | null | string Series outlier hover markers settings.

Returns:

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

hoverStemStroke

Getter for hover stem stroke setting.

Returns:

anychart.graphics.vector.Stroke function - Current hover stem stroke setting.

Try it:

Setter for hover stem stroke by function.

Params:

Name Type Default Description
strokeOrFill 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.Box - Self instance for method chaining.

Try it:

Setter for hover stem stroke settings. Learn more about coloring.

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.Box - Self instance for method chaining.

Try it:

hoverStroke

Getter for current hover stroke settings.

Returns:

anychart.graphics.vector.Stroke - Current hover stroke settings.
Setter for series hover 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 stroke() getter. // this.iterator - series point iterator. return strokeValue; // type anychart.graphics.vector.Fill or anychart.graphics.vector.Stroke }.

Returns:

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

Try it:

Setter for hover stroke settings. Learn more about coloring.

Params:

Name Type Default Description
strokeOrFill anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null
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.Box - Self instance for method chaining.

Try it:

hoverWhiskerStroke

Getter for hover whisker stroke setting.

Returns:

anychart.graphics.vector.Stroke function - Current hover whisker stroke setting.

Try it:

Setter for hover whisker stroke by function.

Params:

Name Type Default Description
strokeOrFill 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.Box - Self instance for method chaining.

Try it:

Setter for hover whisker stroke settings. Learn more about coloring.

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.Box - Self instance for method chaining.

Try it:

hoverWhiskerWidth

Getter for whisker width settings.

Returns:

number string - Whisker width setting or self for chaining.

Try it:

Setter for whisker width settings.

Params:

Name Type Default Description
value number | string
'20%'
Whisker width.

Returns:

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

Try it:

medianStroke

Getter for median stroke setting.

Returns:

anychart.graphics.vector.Stroke function - Current median stroke setting.

Try it:

Setter for median stroke by function.

Params:

Name Type Default Description
strokeOrFill 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.Box - Self instance for method chaining.

Try it:

Setter for median stroke settings. Learn more about coloring.

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.Box - Self instance for method chaining.

Try it:

outlierMarkers

Getter for series outlier markers.

Returns:

anychart.core.ui.MarkersFactory - Markers instance.

Try it:

Setter for series outlier markers.

Params:

Name Type Description
value Object | boolean | null | string Series outlier markers settings.

Returns:

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

stemStroke

Getter for stem stroke setting.

Returns:

anychart.graphics.vector.Stroke function - Current stem stroke setting.

Try it:

Setter for stem stroke by function.

Params:

Name Type Default Description
strokeOrFill 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.Box - Self instance for method chaining.

Try it:

Setter for stem stroke settings. Learn more about coloring.

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.Box - Self instance for method chaining.

Try it:

stroke

Getter for current stroke settings.

Returns:

anychart.graphics.vector.Stroke - 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.index - series index. // this.sourceColor - color returned by stroke() getter. // this.iterator - series point iterator. return strokeValue; // type anychart.graphics.vector.Fill or anychart.graphics.vector.Stroke }.

Returns:

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

Try it:

Setter for stroke settings. Learn more about coloring.

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.Box - Self instance for method chaining.

Try it:

unhover

Removes hover from the series point or series.

Returns:

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

Try it:

whiskerStroke

Getter for whisker stroke setting.

Returns:

anychart.graphics.vector.Stroke function - Current whisker stroke setting.

Try it:

Setter for whisker stroke by function.

Params:

Name Type Default Description
strokeOrFill 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.Box - Self instance for method chaining.

Try it:

Setter for whisker stroke settings. Learn more about coloring.

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.Box - Self instance for method chaining.

Try it:

whiskerWidth

Getter for whisker width settings.

Returns:

number string - Current whisker width setting.

Try it:

Setter for whisker width settings.

Params:

Name Type Default Description
value number | string
'20%'
Whisker width.

Returns:

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

Try it: