Box
Map
A newer version of this page is available. Switch to the current version.

jQuery RangeSelector - 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 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

|

String

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 properties 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 information 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 property to one of the following values.

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

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