Skip to content

Label

Type class

Creates a label on the chart which can be placed anywhere, multiple can be assigned.

Example

```js var chart = AmCharts.makeChart("chartdiv",{ ... "allLabels": [ { "text": "Free label", "bold": true, "x": 20, "y": 20 } ] });```

Sources

This information about Label is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.

Inheritance

Label does not extend any other symbol.

Label is not extended by any other symbol.

Properties

align

Type stringDefault left

alpha

Type numberDefault 1

bold

Type booleanDefault false

Specifies if label is bold or not.

color

Type color

Color of a label.

id

Type string

Unique id of a Label. You don't need to set it, unless you want to.

rotation

Type numberDefault 0

Rotation angle.

size

Type number

Text size.

tabIndex

Type number

In case you set it to some number, the chart will set focus on the label when user clicks tab key. When a focus is set, screen readers like NVDA Screen reader will read the title. Note, not all browsers and readers support this.

text

Type string

Text of a label.

url

Type string

URL which will be access if user clicks on a label.

x

Type number/string

X position of a label.

y

Type number/string

y position of a label.

Methods

Label does not have any methods.

Events

Label does not have any events.