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:
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). |
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. |
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 |
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:
// 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