AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated 7.2.0 version of this document. Switch to the 8.4.0 version to see the up to date information.

class anychart.cartesian.series.Bubble Improve this Doc

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.cartesian.series.Bubble#negativeFill, anychart.cartesian.series.Bubble#negativeStroke, anychart.cartesian.series.Bubble#negativeHatchFill

Params:

NameTypeDescription
valuebooleanWhether to display negative value.

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/__VERSION__/General_settings/Elements_Fill
Note: Works only with anychart.cartesian.series.Bubble#displayNegative.

Params:

NameTypeDefaultDescription
valueanychart.graphics.vector.Fill
null
Color as an object or a string.
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.cartesian.series.Bubble#displayNegative.

Params:

NameTypeDescription
colorstringColor as a string.
opacitynumberColor opacity.

Params:

NameTypeDescription
keysArray.<(anychart.graphics.vector.GradientKey|string)>Gradient keys.
anglenumberGradient angle.
modeboolean | anychart.graphics.vector.Rect | ObjectGradient mode.
opacitynumberGradient opacity.

Params:

NameTypeDescription
keysArray.<(anychart.graphics.vector.GradientKey|string)>Color-stop gradient keys.
cxnumberX ratio of center radial gradient.
cynumberY ratio of center radial gradient.
modeanychart.graphics.math.RectIf defined then userSpaceOnUse mode, else objectBoundingBox.
opacitynumberOpacity of the gradient.
fxnumberX ratio of focal point.
fynumberY ratio of focal point.

Params:

NameTypeDescription
imageSettingsanychart.graphics.vector.FillObject with settings.

hoverNegativeHatchFill

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

Params:

NameTypeDescription
patternFillOrTypeanychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | anychart.graphics.vector.HatchFill.HatchFillType | stringPatternFill or HatchFill instance or type of hatch fill.
colorstringColor.
thicknessnumberThickness.
sizenumberPattern size.

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.cartesian.series.Bubble#displayNegative.

Params:

NameTypeDefaultDescription
fillFunctionfunction
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 }.
Setter for stroke settings.
Learn more about stroke settings: https://docs.anychart.com/__VERSION__/General_settings/Elements_Stroke
Note: Works only with anychart.cartesian.series.Bubble#displayNegative.

Params:

NameTypeDefaultDescription
strokeOrFillanychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null
Fill settings or stroke settings.
thicknessnumber
1
Line thickness.
dashpatternstring
Controls the pattern of dashes and gaps used to stroke paths.
lineJoinanychart.graphics.vector.StrokeLineJoin
Line join style.
lineCapanychart.graphics.vector.StrokeLineCap
Line cap style.

maximumSize

Getter for current maximum bubble size.

Returns:

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

Params:

NameTypeDefaultDescription
valuestring | number
'95%'
Maximum size of the bubble.

minimumSize

Getter for current minimum bubble size.

Returns:

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

Params:

NameTypeDefaultDescription
valuestring | number
'10%'
Minimum size of the bubble.

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/__VERSION__/General_settings/Elements_Fill
Note: Works only with anychart.cartesian.series.Bubble#displayNegative.

Params:

NameTypeDefaultDescription
valueanychart.graphics.vector.Fill
null
Color as an object or a string.
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.cartesian.series.Bubble#displayNegative.

Params:

NameTypeDescription
colorstringColor as a string.
opacitynumberColor opacity.

Params:

NameTypeDescription
keysArray.<(anychart.graphics.vector.GradientKey|string)>Gradient keys.
anglenumberGradient angle.
modeboolean | anychart.graphics.vector.Rect | ObjectGradient mode.
opacitynumberGradient opacity.

Params:

NameTypeDescription
keysArray.<(anychart.graphics.vector.GradientKey|string)>Color-stop gradient keys.
cxnumberX ratio of center radial gradient.
cynumberY ratio of center radial gradient.
modeanychart.graphics.math.RectIf defined then userSpaceOnUse mode, else objectBoundingBox.
opacitynumberOpacity of the gradient.
fxnumberX ratio of focal point.
fynumberY ratio of focal point.

Params:

NameTypeDescription
imageSettingsanychart.graphics.vector.FillObject with settings.

negativeHatchFill

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

Params:

NameTypeDescription
patternFillOrTypeanychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | anychart.graphics.vector.HatchFill.HatchFillType | stringPatternFill or HatchFill instance or type of hatch fill.
colorstringColor.
thicknessnumberThickness.
sizenumberPattern size.

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.cartesian.series.Bubble#displayNegative.

Params:

NameTypeDefaultDescription
fillFunctionfunction
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 }.
Setter for stroke settings.
Learn more about stroke settings: https://docs.anychart.com/__VERSION__/General_settings/Elements_Stroke
Note: Works only with anychart.cartesian.series.Bubble#displayNegative.

Params:

NameTypeDefaultDescription
strokeOrFillanychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null
Fill settings or stroke settings.
thicknessnumber
1
Line thickness.
dashpatternstring
Controls the pattern of dashes and gaps used to stroke paths.
lineJoinanychart.graphics.vector.StrokeLineJoin
Line join style.
lineCapanychart.graphics.vector.StrokeLineCap
Line cap style.