Angular CircularGauge - scale.label

Specifies common properties for scale labels.

Selector: dxo-label
Type:

ScaleLabel

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
valueText

String

The formatted value converted to a string.

value

Number

The raw value.

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.

Selector: dxo-font
Type:

Object

format

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

Selector: dxo-format
Type:

Format

| undefined
Default Value: undefined

See the format section for information on accepted values.

When this property value is undefined, the date-time axes display larger date range boundaries in labels. For example, if an axis displays months, it also displays a year near each instance of January. If an axis displays days, it also displays a month name near each first visible day mark.

See Also

hideFirstOrLast

Specifies which label to hide in case of overlapping.

Default Value: 'last'

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:

LabelOverlap

Default Value: 'hide'

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