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:
Name | Type | Default | Description |
---|---|---|---|
align | anychart.enums.Align | string | 'center' | Callout align to set. |
Returns:
anychart.core.ui.Callout - Self instance for method chaining.Try it:
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:
Name | Type | Description |
---|---|---|
settings | string | Object | null | boolean | Background settings. |
Returns:
anychart.core.ui.Callout - Self instance for method chaining.Try it:
enabled
Getter for the element state (enabled or disabled).
Returns:
boolean - Element state.Try it:
Setter for the element enabled state.
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Enabled state to set. |
Returns:
anychart.core.ui.Callout - Self instance for method chaining. Example.
if (!element.enabled()) element.enabled(true);
Try it:
hovered
Getter for hovered state settings.
Returns:
anychart.core.StateSettings - Hovered state settingsTry it:
Setter for hovered state settings.
Params:
Name | Type | Description |
---|---|---|
settings | Object | State settings to set. |
Returns:
anychart.core.ui.Callout - Self instance for method chaining.Try it:
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:
Name | Type | Description |
---|---|---|
itemsList | Array.<string> | Items as region id. |
Returns:
anychart.core.ui.Callout - Self instance for method chaining.Try it:
labels
Setter for callout labels.
Detailed description
Callout labels get background settings from point which are attached and ignore their own settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
settings | Object | boolean | null | true | Callout labels. |
Returns:
anychart.core.ui.Callout - Self instance for method chaining.Try it:
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:
Name | Type | Description |
---|---|---|
length | string | number | null | Callout length to set. |
Returns:
anychart.core.ui.Callout - Self instance for method chaining.Try it:
margin
Getter for the callout margin.
Detailed description
Also, you can use anychart.core.utils.Margin#bottom, anychart.core.utils.Margin#left,
anychart.core.utils.Margin#right, anychart.core.utils.Margin#top methods to setting paddings.
Returns:
anychart.core.utils.Margin - The callout margin.Try it:
Setter for the callout margin using a single value.
Params:
Name | Type | Description |
---|---|---|
margin | Array.<(number|string)> | Object | Callout margin to set. |
Returns:
anychart.core.ui.Callout - Self instance for method chaining.Try it:
Setter for the callout margin using several values.
Params:
Name | Type | Description |
---|---|---|
value1 | string | number | Top or top-bottom space. |
value2 | string | number | Right or right-left space. |
value3 | string | number | Bottom space. |
value4 | string | number | Left space. |
Returns:
anychart.core.ui.Callout - Self instance for method chaining.Try it:
normal
Getter for normal state settings.
Returns:
anychart.core.StateSettings - Normal state settings.Try it:
Setter for normal state settings.
Params:
Name | Type | Description |
---|---|---|
settings | Object | State settings to set. |
Returns:
anychart.core.ui.Callout - Self instance for method chaining.Try it:
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:
Name | Type | Default | Description |
---|---|---|---|
orientation | anychart.enums.Orientation | string | 'left' | Callout orientation to set. |
Returns:
anychart.core.ui.Callout - Self instance for method chaining.Try it:
padding
Getter for the callout padding.
Detailed description
Also, you can use anychart.core.utils.Padding#bottom, anychart.core.utils.Padding#left,
anychart.core.utils.Padding#right, anychart.core.utils.Padding#top methods to setting paddings.
Returns:
anychart.core.utils.Padding - The callout padding.Try it:
Setter for the callout padding using a single value.
Params:
Name | Type | Description |
---|---|---|
padding | Array.<(number|string)> | Object | Callout padding to set . |
Returns:
anychart.core.ui.Callout - Self instance for method chaining.Try it:
Setter for the callout padding using several numbers.
Params:
Name | Type | Description |
---|---|---|
value1 | string | number | Top or top-bottom space. |
value2 | string | number | Right or right-left space. |
value3 | string | number | Bottom space. |
value4 | string | number | Left space. |
Returns:
anychart.core.ui.Callout - Self instance for method chaining.Try it:
selected
Getter for selected state settings.
Returns:
anychart.core.StateSettings - Selected state settingsTry it:
Setter for selected state settings.
Params:
Name | Type | Description |
---|---|---|
settings | Object | State settings to set. |
Returns:
anychart.core.ui.Callout - Self instance for method chaining.Try it:
title
Setter for the callout title.
Detailed description
Sets callout title settings depending on parameter type:
- string - sets callout title text value.
- object - sets callout title settings.
Params:
Name | Type | Description |
---|---|---|
settings | null | boolean | Object | string | Callout title settings. |
Returns:
anychart.core.ui.Callout - Axis title or itself for method chaining.Try it:
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:
Name | Type | Description |
---|---|---|
width | number | string | Callout width to set. |
Returns:
anychart.core.ui.Callout - Self instance for method chaining.Try it:
zIndex
Setter for the Z-index of the element.
Detailed description
The bigger the index - the higher the element position is.
Params:
Name | Type | Default | Description |
---|---|---|---|
zIndex | number | 0 | Value to set. |
Returns:
anychart.core.ui.Callout - Self instance for method chaining.Try it: