label

Specifies options for value axis labels.

Type: Object

Axis labels represent textual values for axis ticks, which are not visible by default. To specify custom settings for the value axis labels, use the label configuration object. If you need to set a common value for labels on all axes, use the commonAxisSettings | label configuration object. This object exposes the properties that can be specified for labels on all axes simultaneously. Note that a value specified for the value axis individually (in the valueAxis | label object) overrides the value that is specified in the commonAxisSettings | label object.

Show Example:
jQuery

In this example, additional text is added to the value axis labels using the customizeText option.


                                    

                                    

customizeHint

Specifies the text for a hint that appears when a user hovers the mouse pointer over a label on the value axis.

Type: function(axisValue)
Function parameters:
axisValue: Object
An object providing access to the value displayed by the axis label.
Object structure:
The value as it is specified in the data source.
valueText: String
The value with applied formatting.
Return Value: String
The text to be displayed in the hint.

This option accepts a function that must return the required text. When implementing this function, use its parameter to access the value displayed by the axis label.

Show Example:
jQuery

In the example below, the value axis labels are detailed in a hint. This is performed using the label's customizeHint option.


                                    

                                    

customizeText

Specifies a callback function that returns the text to be displayed in value axis labels.

Type: function(axisValue)
Function parameters:
axisValue: Object
Defines an axis value.
Object structure:
Specifies the axis value that is currently represented.
valueText: String
Specifies the currently represented axis value with applied formatting.
Return Value: String
The text to be displayed by a value axis label.
Cannot be used in themes.

When implementing a callback function for this configuration option, use the value to be displayed in a label. This value can be accessed using the fields of the object that is passed as the function's parameter. Alternatively, you can use the this object within the function. This object has the same structure as the object passed as a parameter.

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

Show Example:
jQuery

In the example below, additional text is added to the value axis' label values using the customizeText option.


                                    

                                    

font

Specifies font options for axis labels.

Type: Object

Show Example:
jQuery

In this example, the font color of the value axis label text is black, and the font size is increased to 15 pixels.


                                    

                                    

format

Specifies a format for the text displayed by axis 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.
Show Example:
jQuery

The example below shows a chart with formatted value axis labels. The format of these labels is set to 'fixedPoint' using the format option.


                                    

                                    

indentFromAxis

Specifies the spacing between an axis and its labels in pixels.

Type: Number
Default Value: 5

IdentFromAxis ChartJS

overlappingBehavior

Specifies the overlap resolving algorithm to be applied to axis labels.

Type: String
Default Value: 'enlargeTickInterval'
Accepted Values: 'ignore' | 'enlargeTickInterval'

When labels overlap each other, you can specify how these labels will be displayed by setting the overlappingBehavior option.

The following values are possible.

  • ignore
    Leave the labels overlapped.
  • enlargeTickInterval
    Leave the labels as they are, but enlarge the axis tick intervals so that the labels do not overlap.

precision

Deprecated

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

Specifies a precision for the formatted value displayed in the axis labels.

Type: Number
Default Value: undefined

visible

Indicates whether or not axis labels are visible.

Type: Boolean
Default Value: true

Show Example:
jQuery

Use the check box at the bottom to change the visibility of the value axis labels.