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";```
Sources
This information about AmBalloon is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.
Inheritance
AmBalloon does not extend any other symbol.
AmBalloon is not extended by any other symbol.
Properties
adjustBorderColorType
booleanDefaultfalseIf this is set to true, border color instead of background color will be changed when user rolls-over the slice, graph, etc.
borderAlphaType
numberDefault1Balloon border opacity. Value range is 0 - 1.
borderColorType
stringDefault#FFFFFFBalloon border color.
borderThicknessType
numberDefault2Balloon border thickness.
colorType
stringDefault#FFFFFFColor of text in the balloon.
cornerRadiusType
numberDefault6Balloon corner radius.
fillAlphaType
numberDefault1Balloon background opacity.
fillColorType
stringDefault#CC0000Balloon background color. Usually balloon background color is set by the chart. Only if "adjustBorderColor" is "true" this color will be used.
fontSizeType
numberSize of text in the balloon. Chart's fontSize is used by default.
horizontalPaddingType
numberDefault8Horizontal padding of the balloon.
pointerWidthType
numberDefault10The width of the pointer (arrow) "root". Only used if cornerRadius is 0.
showBulletType
booleanDefaultfalseIf 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
textAlignType
stringDefaultmiddleText alignment, possible values "left", "middle" and "right"
textShadowColorType
stringDefault#000000Color of the text shadow.
verticalPaddingType
numberDefault5Vertical padding of the balloon.
Methods
hide()Returns
voidHides balloon.
setBounds()Returns
voidDefines a square within which the balloon should appear. Bounds are set by chart class, you don't need to call this method yourself.
setPosition()Returns
voidSets coordinates the balloon should point to.
show()Returns
voidSpecifies the text which should be displayed.
Events
AmBalloon does not have any events.