Hello experts,
I'm trying to create a SliderItem with customized captions for the range that the Slider is working with. For example, I want to create a slider with a numeric range 1 until 5, but instead of the numerical boundaries "1" and "5" being displayed just below the slider, I want to display "Low" and "High" instead.
An alternative to this scenario is a SliderItem that displays all step values, and not only the minimum and maximum boundaries. A real-life example could be "Very Low" / "Low" / "Neutral" / "High" / "Very High".
So far, I've been experimenting with the SliderItem valueMap property which looks promising. But unfortunately to no good result yet:
Properties like minValue, maxValue, numValues seem to be mandatory anyway, otherwise a slider between the range 1..100 is displayed. I suppose that if a properly set valueMap would work, I also would be able to get my first scenario working: by setting the value for items 2, 3 and 4 to an empty string, as illustrated below:
Let me emphasize that I know that the SliderItem only supports numerical values, and there is nothing wrong with that. I just want to change the displayed caption(s) that the user is seeing.
Do you have any idea how this problem can be properly solved in the coding above?
Many thanks in advance for your valuable input!
Kind regards,
Rene Tran-Guillot
I'm trying to create a SliderItem with customized captions for the range that the Slider is working with. For example, I want to create a slider with a numeric range 1 until 5, but instead of the numerical boundaries "1" and "5" being displayed just below the slider, I want to display "Low" and "High" instead.
An alternative to this scenario is a SliderItem that displays all step values, and not only the minimum and maximum boundaries. A real-life example could be "Very Low" / "Low" / "Neutral" / "High" / "Very High".
So far, I've been experimenting with the SliderItem valueMap property which looks promising. But unfortunately to no good result yet:
Code:
isc.Slider.create({
ID: "%itemName%",
vertical: false,
type: "send",
align: "center",
minValue: 1,
maxValue: 5,
numValues: 5,
valueMap: { 1: "Very Low", 2: "Low", 3: "Neutral", 4: "High", 5: "Very High" },
showTitle: false,
width: "60%"
});
Code:
valueMap: { 1: "Low", 2: "", 3: "", 4: "", 5: "High" }
Do you have any idea how this problem can be properly solved in the coding above?
Many thanks in advance for your valuable input!
Kind regards,
Rene Tran-Guillot
Comment