Box
Map
A newer version of this page is available. Switch to the current version.

jQuery Chart - FullStackedAreaSeries.label

An object defining the label configuration properties.

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 properties for all chart series at once.

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

If you have several series of a single type, you can set label properties 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 property 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.

alignment

Aligns point labels in relation to their points.

Type:

String

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

argumentFormat

Formats the point argument before it is displayed in the point label. To format the point value, use the format property.

Type:

Format

Default Value: undefined

A point label displays only the point value by default. Using the label.customizeText property, you can instruct the label to display the point argument as well. The argumentFormat property applies in this case only. This property accepts an object whose fields are described in the format section.

NOTE
DevExtreme UI components 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 topics in the Installation section.
See Also
  • format - provides a comprehensive overview of formatting capabilities.
  • Value Formatting - shows how to apply formatting to various UI component elements.

backgroundColor

Colors the point labels' background. The default color is inherited from the points.

Type:

String

Default Value: undefined

This property supports the following colors:

You can remove the label's background by setting this property to "none". In this case, the label's text is the same color as the point.

View Demo

border

Configures the borders of point labels.

Type:

Object

connector

Configures the label connectors.

Type:

Object

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 property to true.

customizeText

Customizes the text displayed by point labels.

Type:

Function

Function parameters:
pointInfo:

Object

Information on the series point.

Return Value:

String

The text for the label to display.

Cannot be used in themes.

This property 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.
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.
point The Point object.
seriesName The name of the series to which the point belongs.
NOTE
As an alternative to the function’s parameter you can use the this keyword.
See Also

font

Specifies font properties for point labels.

Type:

Object

format

Formats the point value before it is displayed in the point label.

Type:

Format

Default Value: undefined

See the format section for information on accepted values.

If you specify the format with an object and apply it to a full-stacked-like series, this object can also contain the percentPrecision field. Full-stacked-like series points have absolute and percentage values. The percentPrecision field specifies how many decimal digits the percentage values should have:

JavaScript
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 %)
}
See Also

horizontalOffset

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

Type:

Number

Default Value: 0

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

rotationAngle

Rotates point labels.

Type:

Number

Default Value: 0

verticalOffset

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

Type:

Number

Default Value: 0

The number assigned to this property 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