Angular RangeSelector - 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 that allow you to change the font for text.

View Demo

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

Date

|

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.
See Also

font

Specifies font options for the text displayed in the range selector's scale labels.

Type:

Object

format

Formats a value before it is displayed in a scale label.

Type:

Format

Default Value: undefined

See the format section for details on accepted values.

See Also

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 option to one of the following values.

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

When using the widget as an ASP.NET MVC Control, specify this option using the ScaleLabelOverlappingBehavior enum. This enum accepts the following values: Hide and None.

precision Deprecated

Use the scale.label.format.precision option instead.

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

Type:

Number

Default Value: undefined

topIndent

Specifies a spacing between scale labels and the background bottom edge.

Type:

Number

Default Value: 7

RangeSelectorScaleLabelTopIndent ChartJS

visible

Specifies whether or not the scale's labels are visible.

Type:

Boolean

Default Value: true