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

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.
Labels
hoverLabels()Callout hover labels settings
labels()Callout labels settings
selectLabels()Callout select labels settings
Size and Position
align()Align settings.
length()Length settings.
margin()Margin settings.
orientation()Orientation settings.
padding()Padding settings.
width()Width settings.

Methods Description

align

Getter for callout align settings.

Returns:

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

Params:

NameTypeDefaultDescription
valueanychart.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 currentCallout = australiaMap.callout();
currentCallout.items(["AU.CT", "AU.WA", "AU.NS", "AU.SA"]);
var calloutBackground = currentCallout.background();
Setter for the callout background.

Params:

NameTypeDescription
valuestring | Object | null | booleanBackground settings.

Returns:

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

hoverLabels

Getter for callout hover labels.

Returns:

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

Params:

NameTypeDescription
valueObject | boolean | nullHover labels settings.

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 currentCallout = australiaMap.callout();
var calloutItems = currentCallout.items();
Setter for callout items.

Params:

NameTypeDescription
valueArray.<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
valueObject | 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 currentCallout = australiaMap.callout();
currentCallout.items(["AU.CT", "AU.WA", "AU.NS", "AU.SA"]);
var calloutLength = currentCallout.length();
Setter for the callout length.

Params:

NameTypeDescription
valuestring | 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
valueArray.<(number|string)> | ObjectValue 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.

orientation

Getter for the callout orientation.

Returns:

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

Params:

NameTypeDefaultDescription
valuestring | anychart.enums.Orientation | null
"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
valueArray.<(number|string)> | ObjectValue 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.

selectLabels

Getter for callout select labels.

Returns:

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

Params:

NameTypeDescription
valueObject | boolean | nullSelect labels settings.

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
valuenull | boolean | Object | stringCallout title.

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 currentCallout = australiaMap.callout();
currentCallout.items(["AU.CT", "AU.WA", "AU.NS", "AU.SA"]);
var calloutWidth = currentCallout.width();
Setter for the callout width.

Params:

NameTypeDescription
valuenumber | stringCallout width to set.

Returns:

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