scale label

Specifies common options for scale labels.

Type: Object

Scale labels represent textual values for major scale ticks. The label object exposes properties that allow you to specify custom text for scale labels and properties to change the text font.

customizeText

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

Type: function

When implementing a callback function for this property, use the scale value to be displayed in a label. These values can be accessed using the following properties of the this object.

  • value
    Specifies the scale value represented by a label.
  • valueText
    Specifies the scale value with an applied format, if the format and precision (optional) properties are specified.

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

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

font

Specifies font options for the text displayed in the scale labels of the gauge.

Type: Object

format

Specifies a format for the text displayed in scale labels.

Type: String
Default Value: ''
Accepted Values: 'currency' | 'fixedPoint' | 'percent' | 'decimal' | 'exponential' | 'largeNumber' | 'thousands' | 'millions' | 'billions' | 'trillions'

Labels display scale values. You can apply formatting to the label text using one of the following predefined numeric formats.

  • 'currency' - displays a value as currency
  • 'currency largeNumber' – a value is divided by a number (one thousand, one million, one billion or one trillion), so that the value is less than a thousand; then, the letter 'K', 'M', 'B' or 'T' is added and the 'currency' format is applied
  • 'currency thousands' - a value is divided by one thousand, the letter 'K' is added and the 'currency' format is applied
  • 'currency millions' - a value is divided by one million, the letter 'M' is added and the 'currency' format is applied
  • 'currency billions' - a value is divided by one billion, the letter 'B' is added and the 'currency' format is applied
  • 'currency trillions' - a value is divided by one trillion, the letter 'T' is added and the 'currency' format is applied
  • 'fixedPoint' - displays a value as a real numeric value with a specified number of digits for the fractional part and an optional negative sign
  • 'fixedPoint largeNumber' - a value is divided by a number (one thousand, one million, one billion or one trillion), so that the value is less than a thousand; then, the letter 'K', 'M', 'B' or 'T' is added and the 'fixedPoint' format is applied
  • 'fixedPoint thousands' - a value is divided by one thousand, the letter 'K' is added and the 'fixedPoint' format is applied
  • 'fixedPoint millions' - a value is divided by one million, the letter 'M' is added and the 'fixedPoint' format is applied
  • 'fixedPoint billions' - a value is divided by one billion, the letter 'B' is added and the 'fixedPoint' format is applied
  • 'fixedPoint trillions' - a value is divided by one trillion, the letter 'T' is added and the 'fixedPoint' format is applied
  • 'decimal' – displays a value as an integer with an optional negative sign
  • 'decimal largeNumber' - a value is divided by a number (one thousand, one million, one billion or one trillion), so that the value is less than a thousand; then, the letter 'K', 'M', 'B' or 'T' is added and the 'decimal' format is applied
  • 'decimal thousands' - a value is divided by one thousand, the letter 'K' is added and the 'decimal' format is applied
  • 'decimal millions' - a value is divided by one million, the letter 'M' is added and the 'decimal' format is applied
  • 'decimal billions' - a value is divided by one billion, the letter 'B' is added and the 'decimal' format is applied
  • 'decimal trillions' - a value is divided by one trillion, the letter 'T' is added and the 'decimal' format is applied
  • 'largeNumber' - a value is divided by a number (one thousand, one million, one billion or one trillion) so that the value is less than a thousand; then the letter 'K', 'M', 'B' or 'T' is added and the 'fixedPoint' format is applied
  • 'thousands' - a value is divided by one thousand, the letter 'K' is added and the 'fixedPoint' format is applied
  • 'millions' - a value is divided by one million, the letter 'M' is added and the 'fixedPoint' format is applied
  • 'billions' - a value is divided by one billion, the letter 'B' is added and the 'fixedPoint' format is applied
  • 'trillions' - a value is divided by one trillion, the letter 'T' is added and the 'fixedPoint' format is applied
  • 'percent' - a value is multiplied by 100 and displayed as a percent symbol
  • 'exponential' – displays a value with an exponential notation

NOTE: You can set a precision for label text when the 'fixedPoint', 'exponential', 'currency' or 'percent' format is applied. Use the precision property to do this.
In addition to the predefined formats above, you can assign a custom format. Use format tokens from the Globalize JavaScript library to do this.

For details on formatting, refer to the Data Formatting topic.

indentFromTick

Specifies the spacing between scale labels and ticks in the dxLinearGauge widget.

Type: Number
Default Value: -10

precision

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

Type: Number
Default Value: 2

This property's value must be an integer indicating the number of digits to show in the scale values displayed in labels. This property value is used when labels display scale values in one of the following numeric formats: 'fixedPoint', 'exponential', 'currency' or 'percent'. To learn how to set a format for scale values, refer to the format property description.

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

visible

Specifies whether scale labels are visible on the gauge.

Type: Boolean
Default Value: true
Accepted Values: true|false