AnyChart
API Reference
Still have questions?
Contact support
Top

class anychart.core.ui.Callout Improve this Doc

Extends: anychart.core.VisualBase

Callout class.

Methods Overview

Specific settings
items()Items settings.
title()Title settings.
Coloring
background()Background settings.
Interactivity
enabled()Element state (enabled or disabled).
hovered()Hovered state settings.
normal()Normal state settings.
selected()Selected state settings.
Labels
labels()Callout labels settings
Size and Position
align()Align settings.
length()Length settings.
margin()Margin settings.
orientation()Orientation settings.
padding()Padding settings.
width()Width settings.
zIndex()Z-index of the element.

Methods Description

align

Getter for callout align settings.

Returns:

anychart.enums.Align | string - Callout align.
See listing
var callout = australiaMap.callout();
callout.items(['AU.CT', 'AU.WA', 'AU.NS', 'AU.SA']);
var calloutAlign = callout.align();
Setter for callout align setting.

Params:

NameTypeDefaultDescription
alignanychart.enums.Align | string
'center'
Callout align to set.

Returns:

anychart.core.ui.Callout - Self instance for method chaining.

background

Getter for the callout background.

Returns:

anychart.core.ui.Background - Background instance.
See listing
var callout = australiaMap.callout();
callout.items(['AU.CT', 'AU.WA', 'AU.NS', 'AU.SA']);
var background = callout.background();
Setter for the callout background.

Params:

NameTypeDescription
settingsstring | Object | null | booleanBackground settings.

Returns:

anychart.core.ui.Callout - Self instance for method chaining.

enabled

Getter for the element state (enabled or disabled).

Returns:

boolean - Element state.
Setter for the element enabled state.

Params:

NameTypeDefaultDescription
enabledboolean
true
Enabled state to set.

Returns:

anychart.core.ui.Callout - Self instance for method chaining.
Example.
if (!element.enabled())
   element.enabled(true);

hovered

Getter for hovered state settings.

Returns:

anychart.core.StateSettings - Hovered state settings
Setter for hovered state settings.

Params:

NameTypeDescription
settingsObjectState settings to set.

Returns:

anychart.core.ui.Callout - Self instance for method chaining.

items

Getter for callout items.

Returns:

Array.<string> - An array of items id.
See listing
var callout = australiaMap.callout();
var items = callout.items();
Setter for callout items.

Params:

NameTypeDescription
itemsListArray.<string>Items as region id.

Returns:

anychart.core.ui.Callout - Self instance for method chaining.

labels

Getter for callout labels.

Returns:

anychart.core.ui.LabelsFactory - Callout labels instance.
Setter for callout labels.

Params:

NameTypeDefaultDescription
settingsObject | boolean | null
true
Callout labels.

Returns:

anychart.core.ui.Callout - Self instance for method chaining.

length

Getter for the callout length.

Returns:

null | number | string - The callout length.
See listing
var callout = australiaMap.callout();
callout.items(['AU.CT', 'AU.WA', 'AU.NS', 'AU.SA']);
var calloutLength = callout.length();
Setter for the callout length.

Params:

NameTypeDescription
lengthstring | number | nullCallout length to set.

Returns:

anychart.core.ui.Callout - Self instance for method chaining.

margin

Setter for the callout margin using a single value.

Params:

NameTypeDescription
marginArray.<(number|string)> | ObjectCallout margin to set.

Returns:

anychart.core.ui.Callout - Self instance for method chaining.
Setter for the callout margin using several values.

Params:

NameTypeDescription
value1string | numberTop or top-bottom space.
value2string | numberRight or right-left space.
value3string | numberBottom space.
value4string | numberLeft space.

Returns:

anychart.core.ui.Callout - Self instance for method chaining.

normal

Getter for normal state settings.

Returns:

anychart.core.StateSettings - Normal state settings.
Setter for normal state settings.

Params:

NameTypeDescription
settingsObjectState settings to set.

Returns:

anychart.core.ui.Callout - Self instance for method chaining.

orientation

Getter for the callout orientation.

Returns:

anychart.enums.Orientation | string - Callout orientation.
See listing
var callout = australiaMap.callout();
callout.items(['AU.CT', 'AU.WA', 'AU.NS', 'AU.SA']);
var calloutOrientation = callout.orientation();
Setter for the callout orientation.

Params:

NameTypeDefaultDescription
orientationanychart.enums.Orientation | string
'left'
Callout orientation to set.

Returns:

anychart.core.ui.Callout - Self instance for method chaining.

padding

Setter for the callout padding using a single value.

Params:

NameTypeDescription
paddingArray.<(number|string)> | ObjectCallout padding to set .

Returns:

anychart.core.ui.Callout - Self instance for method chaining.
Setter for the callout padding using several numbers.

Params:

NameTypeDescription
value1string | numberTop or top-bottom space.
value2string | numberRight or right-left space.
value3string | numberBottom space.
value4string | numberLeft space.

Returns:

anychart.core.ui.Callout - Self instance for method chaining.

selected

Getter for selected state settings.

Returns:

anychart.core.StateSettings - Selected state settings
Setter for selected state settings.

Params:

NameTypeDescription
settingsObjectState settings to set.

Returns:

anychart.core.ui.Callout - Self instance for method chaining.

title

Getter for the callout title.

Returns:

anychart.core.ui.Title - Callout title.
Setter for the callout title.

Params:

NameTypeDescription
settingsnull | boolean | Object | stringCallout title settings.

Returns:

anychart.core.ui.Callout - Axis title or itself for method chaining.

width

Getter for the callout width.

Returns:

number | string | null - The callout width.
See listing
var callout = australiaMap.callout();
callout.items(['AU.CT', 'AU.WA', 'AU.NS', 'AU.SA']);
var width = callout.width();
Setter for the callout width.

Params:

NameTypeDescription
widthnumber | stringCallout width to set.

Returns:

anychart.core.ui.Callout - Self instance for method chaining.

zIndex

Getter for the Z-index of the element.

Returns:

number - Z-index.
Setter for the Z-index of the element.

Params:

NameTypeDefaultDescription
zIndexnumber
0
Value to set.

Returns:

anychart.core.ui.Callout - Self instance for method chaining.