Configuration tooltip

Specifies tooltip options for the gauge.

Type: Object

A tooltip is a small pop-up rectangle that displays the value of the tick that is currently hovered over. You can enable or disable tooltips, format or customize the displayed text, and change the default appearance. Use the properties of the tooltip configuration object to do this.

customizeText

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

Type: function

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

  • value
    Specifies the scale value represented by a tooltip.
  • 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.

enabled

Specifies whether or not tooltips are enabled in the gauge.

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

When this property is set to true, tooltips for all ticks in the gauge become enabled.

font

Specifies font options for the text displayed by tooltips.

Type: Object

format

Specifies a format for the text displayed in a tooltip.

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

Tooltips display scale values. You can apply formatting to the tooltip 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 tooltip 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.

precision

Specifies a precision for the formatted value displayed in a tooltip.

Type: Number
Default Value: undefined

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.