label

Configures point labels.

Type: Object

Declared in commonSeriesSettings, the label settings apply to all point labels in the chart. Declared in a series configuration object, the label settings apply only to the point labels that belong to this particular series. The series-specific label settings override the common ones.

See Also
  • customizeLabel - сustomizes the appearance of an individual point label.

alignment

Aligns point labels in relation to their points.

Type: String
Default Value: 'center'
Accepted Values: 'left' | 'center' | 'right'

argumentFormat

Formats the point argument before it will be displayed in the point label.

Type: Format
Default Value: undefined

Be default, a point label displays only the point value. Using the label | customizeText option, you can instruct the label to display the point argument as well. The argumentFormat option applies in this case only.

This option accepts an object whose fields are described in the format section. However, there is one more field available called argumentPrecision. This field accepts a number specifying how many digits after the decimal point to save in a value of a numeric format. See an example in the following code.

// 12.3456 --> 12.34
argumentFormat: {
    type: "fixedPoint",
    argumentPrecision: 2
}
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

Colors the background of point labels. By default, point labels inherit the color from their points.

Type: String
Default Value: undefined

border

Configures the borders of point labels.

Type: Object

connector

Configures the label connectors.

A point label is always displayed near its series point, though the label is placed separately. To make the relationship between the series point and its label evident, use a connector.

By default, label connectors are hidden. To make them visible, set the connector | visible option to true.

customizeText

Customizes the text displayed by point labels.

Type: function
Function parameters:
pointInfo: Object

Information defining the series point.

Return Value: String

The text to be displayed in the point label.

Cannot be used in themes.

This option accepts a function whose parameter exposes the following fields.

Field Description
originalValue The raw value of the point.
value The originalValue after type cast.
valueText The value with an applied format and converted to string.
originalArgument The raw argument of the point.
argument The originalArgument after type cast.
argumentText The argument with an applied format and converted to string.
size The size value of the point. For bubble series only.
index 0 - if the point is minimum; 1 - if the point is maximum. For range area and range bar series only.
point The Point object.
seriesName The name of the series to which the point belongs.

The following fields are inherent to stacked-like series only.

Field Description
percent The percentage value of the point.
percentText The percent with an applied format and converted to string.
total The sum of all values in the stack.
totalText The total with an applied format and converted to string.

The following fields are inherent to financial series (candlestick and stock) only.

Field Description
originalOpenValue The raw open value of the point.
openValue The originalOpenValue after type cast.
openValueText The openValue with an applied format and converted to string.
originalCloseValue The raw close value of the point.
closeValue The originalCloseValue after type cast.
closeValueText The closeValue with an applied format and converted to string.
originalHighValue The raw high value of the point.
highValue The originalHighValue after type cast.
highValueText The highValue with an applied format and converted to string.
originalLowValue The raw low value of the point.
lowValue The originalLowValue after type cast.
lowValueText The lowValue with an applied format and converted to string.
reductionValue The reduction value.
reductionValueText The reductionValue with an applied format and converted to string.
NOTE
All fields listed in this description are also exposed by the this object.
See Also
  • Data Formatting - shows how to apply formatting to various widget elements.

font

Specifies font options for point labels.

Type: Object

format

Formats the point value before it will be displayed in the point label.

Type: Format
Default Value: undefined

This option accepts an object whose fields are described in the format section. However, there is one more field, called percentPrecision, which is available only to full-stacked-like series, where one point always has an absolute and a percentage value. The percentPrecision field specifies how many digits after the decimal point to save in the percentage value. See an example in the following code.

format: {
    type: "fixedPoint", // the format of absolute values
    precision: 1, // the precision of absolute values (123.456 --> 123.4)
    percentPrecision: 2 // the precision of percentage values (12.3456 % --> 12.34 %)
}
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.

horizontalOffset

Along with verticalOffset, shifts point labels from their initial positions.

Type: Number
Default Value: 0

The number assigned to this option specifies the shift in pixels. A negative number shifts the point labels to the left, a positive number - to the right.

percentPrecision

Deprecated

Use the series | label | format | percentPrecision instead.

Specifies a precision for the percentage values displayed in the labels of a full-stacked-like series.

Type: Number
Default Value: undefined
This member is exposed by the following entities:

position

Specifies whether to display point labels inside or outside of series points. Applies only to bubble, range-like and bar-like series.

Type: String
Default Value: 'outside'
Accepted Values: 'outside' | 'inside'
NOTE
The default value for full-stacked bar and stacked bar series is 'inside'.

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

Rotates point labels.

Type: Number
Default Value: 0

showForZeroValues

Specifies whether or not to show labels for points with zero value. Applies only to bar-like series.

Type: Boolean
Default Value: true
This member is exposed by the following entities:

verticalOffset

Along with horizontalOffset, shifts point labels from their initial positions.

Type: Number
Default Value: 0

The number assigned to this option specifies the shift in pixels. A negative number shifts the point labels up, a positive number shifts them down.

visible

Makes the point labels visible.

Type: Boolean
Default Value: false