I am currently facing the challenge to realize a Slider in SAPUI5 exactly like the Threshold-Slider from Webdynpro, which looks like this.
How would you do this? It is highly dynamic, the scale (can be 5 values, can be 3 values etc), the descriptions are depending on the scale value ...
Currently I only find Slider in API, but I doubt this is realizable with it ... any ideas?
18.06.2015: currently I am working on extending the sap.ui.commons.Slider, what I got right now is far away from what I try to achieve:
- When clicking on slider, Change Background Color via renderer (each value should have another Color
- Textfield on the right-hand side and a link on the left side (optional parts, coloring is more important)
What i got...
sap.ui.commons.Slider.extend("my.Slider", {
renderer : {
renderInnerAttributes : function(oRm, oControl) {
console.log(oRm); // try to find out, what I re-style
console.log(oControl); // try to find out, what I re-style
oRm.addStyle('background-color', '#ffff00'); // no effect
},
}
});
var oSlider6 = new my.Slider({
id : 'Slider6',
tooltip : 'Slider6',
width : '500px',
min : 1,
max : 4,
value : 0,
totalUnits : 4,
smallStepWidth : 1,
stepLabels : true,
labels : [
"Bad", "Medium", "Good", "Very Good"
]
});
return oSlider6;