Skip to main content

Slider.RangedLabels

Description

The Slider.RangedLabels type defines a set of labels to be displayed as part of a Slider control.

Properties

  • labels (Array<Slider.Label>, required) - The set of labels to display.
  • range (Array<number>, required) - The minimum and maximum values of the associated slider control for which this label will be displayed. Contains 2 and only 2 values.

Example

In the first example the associated Slider.Label would be displayed if the value of the corresponding Slider control was between 1 and 2.

{
"labels" : [
{
"expression" : "floor($0)",
"text" : "%0.0f day"
}
],
"range" : [
1,
2
]
}

In the second example the associated Slider.Label would be displayed if the value of the corresponding Slider control was between 2 and 90. Note the pluralisation of text in the label in this case.

{
"labels" : [
{
"expression" : "floor($0)",
"text" : "%0.0f days"
}
],
"range" : [
2,
90
]
}