Angular LinearGauge - scale.label

Specifies common properties 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

Function parameters:
scaleValue:

Object

Information on the scale value.

Object structure:
Name Type Description
value

Number

The raw value.

valueText

String

The formatted value converted to a string.

Return Value:

String

The text for the label to display.

Cannot be used in themes.

NOTE
As an alternative to the function’s parameter you can use the this keyword.

View Demo

See Also

font

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

Type:

Object

format

Formats a value before it is displayed in a scale label. Accepts only numeric formats.

Type:

Format

Default Value: undefined

See the format section for information on accepted values.

See Also

indentFromTick

Specifies the spacing between scale labels and ticks.

Type:

Number

Default Value: -10

overlappingBehavior

Decides how to arrange scale labels when there is not enough space to keep all of them.

Type:

String

Default Value: 'hide'
Accepted Values: 'hide' | 'none'

When scale labels overlap each other, you can rearrange them by setting this property to one of the following values.

  • hide
    Hides certain scale labels leaving more space for the others.
  • none
    Leaves scale labels overlapped.

useRangeColors

Specifies whether or not scale labels should be colored similarly to their corresponding ranges in the range container.

Type:

Boolean

Default Value: false

To paint all scale labels in a single color, you can use the color property of the font object. Alternatively, you can paint scale labels similarly to ranges in the range container. For this purpose, assign true to the useRangeColors property.

visible

Specifies whether or not scale labels are visible on the gauge.

Type:

Boolean

Default Value: true