label

An object defining the label configuration options.

Type: Object

Each series point can be accompanied by a text label that represents data related to the point. These are called series point labels. Use the label object's properties to set label options for all chart series at once.

Specify the label object's properties within the commonSeriesSettings configuration object to set label options for all chart series at once.

If you have several series of a single type, you can set label options to the values specific to this series type using the corresponding object (area, line, etc.) within the commonSeriesSettings configuration object. The values that are set within series-type-specific configuration objects override the corresponding common values.

If you need to set a label option for an individual series, use the label object within the series object of the series array. The values that are set individually override the corresponding common values.

argumentFormat

Specifies a format for arguments displayed by point labels.

Type: Format
Default Value: undefined
NOTE
DevExtreme widgets provide a wide choice of predefined formats. If you are, however, going to use custom formats, link the Globalize library to your project. Learn how to do this from the Installation topic.
See Also
  • format - provides a comprehensive overview of formatting capabilities.
  • Data Formatting - shows how to apply formatting to various widget elements.

argumentPrecision

Deprecated

Use the series | label | argumentFormat | precision instead.

Specifies a precision for formatted point arguments displayed in point labels.

Type: Number
Default Value: undefined

backgroundColor

Specifies a background color for point labels.

Type: String
Default Value: undefined

Labels are painted in the color of the series whose points they represent by default. You can set a custom background color. For this purpose, use the backgroundColor property of the label object.

border

Specifies border options for point labels.

Type: Object

Use this object to make the borders of point labels visible/invisible and set up border options such as color and width.

connector

Specifies connector options for series point labels.

Type: Object

A series point label can be placed separately, near the represented point. To make the relationship between a label and its respective point clear, use a connector. Set the connector's visibility and appearance options using the connector object.

customizeText

Specifies a callback function that returns the text to be displayed by point labels.

Type: function
Function parameters:
pointInfo: Object

Defines the point value to be displayed in a label.

Return Value: String

The text to be displayed in a label.

Cannot be used in themes.

When implementing a callback function for this property, use the point value to be displayed in a label. In addition, you can use the argument of the currently displayed value. These values can be accessed using the following properties of the this object.

  • originalValue
    Specifies the value of the currently represented point as it is set in the data source.
  • value
    Specifies the value of the currently represented point. Differs from the originalValue when the axis' value type differs from the value type in the data source. In this instance, value has the type of the value axis.
  • valueText
    Specifies the value of the currently represented point with applied formatting if the format property is specified (see label).
  • originalArgument
    Specifies the argument value of the currently represented point as it is set in the data source.
  • argument
    Specifies the argument value of the currently represented point. Differs from the originalArgument when the axis' argument type differs from the argument type in the data source. In this instance, argument has the type of the argument axis.
  • argumentText
    Specifies the argument value of the currently represented point with applied formatting if the argumentFormat property is specified.
  • size (for bubble series only)
    Specifies the size of the currently represented bubble as it is set in the data source.
  • index (for range area and range bar series only)
    Specifies whether the currently represented point is maximum (index = 1) or minimum (index = 0).
  • point
    Provides access to the currently represented point. To learn more about the field and methods of the point object, refer to the Point topic in the "Chart Elements" reference section.
  • seriesName
    Specifies the series of the currently represented point.

The function's parameter represents the same object as the this object. If appropriate, you can use the function's parameter to obtain the value that is currently represented by a label.

To get general information on data formatting, refer to the Data Formatting topic.

font

Specifies font options for the text displayed in point labels.

Type: Object

format

Specifies a format for the text displayed by point labels.

Type: Format
Default Value: undefined
NOTE
DevExtreme widgets provide a wide choice of predefined formats. If you are, however, going to use custom formats, link the Globalize library to your project. Learn how to do this from the Installation topic.
See Also
  • format - provides a comprehensive overview of formatting capabilities.
  • Data Formatting - shows how to apply formatting to various widget elements.

precision

Deprecated

Use the series | label | format | precision option instead.

Specifies a precision for formatted point values displayed in point labels.

Type: Number
Default Value: undefined

rotationAngle

Specifies the angle used to rotate point labels from their initial position.

Type: Number
Default Value: 0

visible

Specifies the visibility of point labels.

Type: Boolean
Default Value: false