Information on this website refers to a deprecated product, and is provided only for historical reference. Please use the Version Switcher above to select an appropriate documentation website for the product you are using.

AmBalloon

Type class

AmBalloon is the class which generates balloons (datatips). Balloon follows the mouse when you roll-over the pie slice/line bullet/column/etc, chart indicator of serial charts displays value balloons and category balloon. Balloon instance is created by the chart automatically and can be accessed via "balloon" property of AmChart. Chart shows/hides and sets position for every balloon automatically, so all you need to do is to change balloon appearance, if you want to. For example:

chart = new AmCharts.AmSerialChart();
// get balloon intance
var balloon = chart.balloon;
// set properties
balloon.adjustBorderColor = true;
balloon.color = "#000000";
balloon.cornerRadius = 5;
balloon.fillColor = "#FFFFFF";

Inheritance

AmBalloon does not extend any other symbol.

AmBalloon is not extended by any other symbol.

Properties

adjustBorderColor
#

Type boolean

Default false

If this is set to true, border color instead of background color will be changed when user rolls-over the slice, graph, etc.

borderAlpha
#

Type number

Default 1

Balloon border opacity. Value range is 0 - 1.

borderColor
#

Type string

Default #FFFFFF

Balloon border color.

borderThickness
#

Type number

Default 2

Balloon border thickness.

color
#

Type string

Default #FFFFFF

Color of text in the balloon.

cornerRadius
#

Type number

Default 6

Balloon corner radius.

fillAlpha
#

Type number

Default 1

Balloon background opacity.

fillColor
#

Type string

Default #CC0000

Balloon background color. Usually balloon background color is set by the chart. Only if "adjustBorderColor" is "true" this color will be used.

fontSize
#

Type number

Size of text in the balloon. Chart's fontSize is used by default.

horizontalPadding
#

Type number

Default 8

Horizontal padding of the balloon.

pointerWidth
#

Type number

Default 10

The width of the pointer (arrow) "root". Only used if cornerRadius is 0.

showBullet
#

Type boolean

Default false

If cornerRadius of a balloon is >0, showBullet is set to true for value balloons when ChartCursor is used. If you don't want the bullet near the balloon, set it to false: chart.balloon.showBullet = false

textAlign
#

Type string

Default middle

Text alignment, possible values "left", "middle" and "right"

textShadowColor
#

Type string

Default #000000

Color of the text shadow.

verticalPadding
#

Type number

Default 5

Vertical padding of the balloon.

Methods

hide()

#

Returns void

Hides balloon.

setBounds(
  left,
  top,
  right,
  bottom
)

#

Returns void

Defines a square within which the balloon should appear. Bounds are set by chart class, you don't need to call this method yourself.

setPosition(
  x,
  y
)

#

Returns void

Sets coordinates the balloon should point to.

show(
  value
)

#

Returns void

Specifies the text which should be displayed.

Events

AmBalloon does not have any events.

Adapters

AmBalloon does not have any adapters.