Top
You are looking at an outdated 7.13.1 version of this document. Switch to the 8.0.1 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:

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

Params:

Name Type Description
value string | Object | null | boolean Background settings.

Returns:

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

Try it:

hoverLabels

Getter for callout hover labels.

Returns:

anychart.core.ui.LabelsFactory - Callout hover labels instance.

Try it:

Setter for callout hover labels.

Params:

Name Type Description
value Object | boolean | null Hover labels settings.

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

Params:

Name Type Description
value Array.<string> Items as region id.

Returns:

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

Try it:

labels

Getter for callout labels.

Returns:

anychart.core.ui.LabelsFactory - Callout labels instance.

Try it:

Setter for callout labels.

Params:

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

Params:

Name Type Description
value string | number | null Callout length to set.

Returns:

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

Try it:

margin

Setter for the callout margin using a single value.

Params:

Name Type Description
value Array.<(number|string)> | Object Value 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:

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:

Name Type Default Description
value string | anychart.enums.Orientation | null
"left"
Callout orientation to set.

Returns:

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

Try it:

padding

Setter for the callout padding using a single value.

Params:

Name Type Description
value Array.<(number|string)> | Object Value 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:

selectLabels

Getter for callout select labels.

Returns:

anychart.core.ui.LabelsFactory - Callout select labels instance.

Try it:

Setter for callout select labels.

Params:

Name Type Description
value Object | boolean | null Select labels settings.

Returns:

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

Try it:

title

Getter for the callout title.

Returns:

anychart.core.ui.Title - Callout title.

Try it:

Setter for the callout title.

Params:

Name Type Description
value null | boolean | Object | string Callout 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:

Name Type Description
value number | string Callout width to set.

Returns:

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

Try it: