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

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

Extends: anychart.core.cartesian.series.DiscreteBase

Define Bubble series type.
Note: Use method anychart.charts.Cartesian#bubble to get this series.

Methods Overview

Miscellaneous
displayNegative()Getter for current negative value option.
hoverNegativeFill()Fill as a string or an object.
hoverNegativeHatchFill()Getter for current hatch fill settings.
hoverNegativeStroke()Getter for current stroke settings.
maximumSize()Getter for current maximum bubble size.
minimumSize()Getter for current minimum bubble size.
negativeFill()Fill as a string or an object.
negativeHatchFill()Getter for current hatch fill settings.
negativeStroke()Getter for current stroke settings.

Methods Description

displayNegative

Getter for current negative value option.

Returns:

boolean - Display negaitve setting .
Setter for negative value option.
Note: Negative values are sized basing on absolute value, but shown in a different color. See anychart.core.cartesian.series.Bubble#negativeFill, anychart.core.cartesian.series.Bubble#negativeStroke, anychart.core.cartesian.series.Bubble#negativeHatchFill

Params:

Name Type Description
value boolean Whether to display negative value.

Try it:

hoverNegativeFill

Getter for current series fill color.

Returns:

anychart.graphics.vector.Fill - Current fill color.
Sets fill settings using an object or a string.
Learn more about coloring at: https://docs.anychart.com/7.3.1/General_settings/Elements_Fill
Note: Works only with anychart.core.cartesian.series.Bubble#displayNegative.

Params:

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

Try it:

Fill color with opacity.
Note: If color is set as a string (e.g. 'red .5') it has a priority over opt_opacity, which means: color set like this rect.fill('red 0.3', 0.7) will have 0.3 opacity.
Note: Works only with anychart.core.cartesian.series.Bubble#displayNegative.

Params:

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

Try it:

Linear gradient fill.
Learn more about coloring at: https://docs.anychart.com/7.3.1/General_settings/Elements_Fill
Note: Works only with anychart.core.cartesian.series.Bubble#displayNegative.

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.

Try it:

Radial gradient fill.
Learn more about coloring at: https://docs.anychart.com/7.3.1/General_settings/Elements_Fill
Note: Works only with anychart.core.cartesian.series.Bubble#displayNegative.

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.

Try it:

Params:

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

Try it:

hoverNegativeHatchFill

Getter for current hatch fill settings.
Setter for hatch fill settings.
Learn more about coloring at: https://docs.anychart.com/7.3.1/General_settings/Elements_HatchFill
Note: Works only with anychart.core.cartesian.series.Bubble#displayNegative.

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.

Try it:

hoverNegativeStroke

Getter for current stroke settings.

Returns:

anychart.graphics.vector.Stroke function - Current stroke settings.
Setter for series stroke by function.
Note: Works only with anychart.core.cartesian.series.Bubble#displayNegative.

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 }.

Try it:

Setter for stroke settings.
Learn more about stroke settings: https://docs.anychart.com/7.3.1/General_settings/Elements_Stroke
Note: Works only with anychart.core.cartesian.series.Bubble#displayNegative.

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.

Try it:

maximumSize

Getter for current maximum bubble size.

Returns:

string number - Maximum size of the bubble.
Setter for maximum bubble size.

Params:

Name Type Default Description
value string | number
'95%'
Maximum size of the bubble.

Try it:

minimumSize

Getter for current minimum bubble size.

Returns:

string number - Minimum size of the bubble.
Setter for minimum bubble size.

Params:

Name Type Default Description
value string | number
'10%'
Minimum size of the bubble.

Try it:

negativeFill

Getter for current series fill color.

Returns:

anychart.graphics.vector.Fill - Current fill color.
Sets fill settings using an object or a string.
Learn more about coloring at: https://docs.anychart.com/7.3.1/General_settings/Elements_Fill
Note: Works only with anychart.core.cartesian.series.Bubble#displayNegative.

Params:

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

Try it:

Fill color with opacity.
Note: If color is set as a string (e.g. 'red .5') it has a priority over opt_opacity, which means: color set like this rect.fill('red 0.3', 0.7) will have 0.3 opacity.
Note: Works only with anychart.core.cartesian.series.Bubble#displayNegative.

Params:

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

Try it:

Linear gradient fill.
Learn more about coloring at: https://docs.anychart.com/7.3.1/General_settings/Elements_Fill
Note: Works only with anychart.core.cartesian.series.Bubble#displayNegative.

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.

Try it:

Radial gradient fill.
Learn more about coloring at: https://docs.anychart.com/7.3.1/General_settings/Elements_Fill
Note: Works only with anychart.core.cartesian.series.Bubble#displayNegative.

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.

Try it:

Params:

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

Try it:

negativeHatchFill

Getter for current hatch fill settings.
Setter for hatch fill settings.
Learn more about coloring at: https://docs.anychart.com/7.3.1/General_settings/Elements_HatchFill
Note: Works only with anychart.core.cartesian.series.Bubble#displayNegative.

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.

Try it:

negativeStroke

Getter for current stroke settings.

Returns:

anychart.graphics.vector.Stroke function - Current stroke settings.
Setter for series stroke by function.
Note: Works only with anychart.core.cartesian.series.Bubble#displayNegative.

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 }.

Try it:

Setter for stroke settings.
Learn more about stroke settings: https://docs.anychart.com/7.3.1/General_settings/Elements_Stroke
Note: Works only with anychart.core.cartesian.series.Bubble#displayNegative.

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.

Try it: