Slider and Range Slider

With a slider or range slider, analytic application users can input and change values dynamically and trigger what-if scenarios based on the value.

The difference between a slider and range slider is that a slider defines a single value while a range slider defines a specific range of data. They have the following specific properties:

Common Property
Property Property Value Property Description
Name String Defines the unique name of a slider. If you do not enter a name, the system takes the default name (for example Slider_1 and RangeSlider_1).
Slider Style Properties
Property Property Value Property Description
Progress Bar color Specifies the color of the progress bar.
Background Bar color Specifies the color of the background bar (the remaining part other than the progress bar).
Number Format – Scale unit Specify the scale and scale format of all numbers in the slider.
Number Format – Decimal Places number Specify the decimal places of all numbers in the slider.
Slider Properties Located in the Builder Panel
Property Property Value Property Description
Slider Values number

Enter a number for the Min Value and Max Value.

For a slider, enter a default Current Value between the min and max value.

For a range slider, enter a number for the Start Value and End Value. Both values should be between min and max value.

Options for the Slider Values checkbox
  • To display the min and max values in the slider, choose the option Display Min & Max Value Labels.
  • To display the current value in a slider or the start and end values in a range slider, choose the option Display Current Value Labels.
  • To allow end users to directly enter the default value or the start and end value instead of sliding the bar when running the analytic application, choose the option Enable Value Input.
  • To increase or decrease the default value or the start and end value by a fixed number each step, choose the option Enable Step Selection and enter a positive value for the Step Size.
Note
The difference between current value/max value/end value/start value and min value should be divisible by the step value.

After adding the slider or range slider widget to the canvas or popup, as an application designer you can write scripts to receive the number input by the end user for further processing using the following APIs:

Code Syntax
// Get/set the value of a slider
getValue(): number
setValue(value: number): void

// Get/set the range of a range slider
getRange(): Range
setRange(range: Range): void

// Get/set the minimum value of a slider/range slider
getMinValue(): number
setMinValue(value: number): void

// Get/set the maximum value of a slider/range slider
getMaxValue(): number
setMaxValue(value: number): void

// Get/set the visibility of a slider/range slider
setVisible(value: boolean): void
isVisible(): boolean
  
// Event - It's triggered when an end user finishes the interaction and releases the handler of the slider bar
onChange()

//Allow end users to trigger the creation of a range slider with a predefined start and end value.
Range.create(start: number, end: number): Range