Those of you creating beautiful dashboards for iOS platform using SAP Dashboards (Xcelsius) should have come across the common requirement to provide iOS style slider/ switch rather than using the mundane toggle button or check box to toggle between two values.
Below I will demonstrate a workaround we did for a recent project, which have the similar functionality, look and feel.
Requirement:
Let’s say you need a slider to switch between ‘Unit’ and ‘Value’ of a product.
Pre-Requisites:
To start off, let’s list down the components we would need to achieve this-
b. Horizontal slider component available in Xcelsius
Implementation:
5. In Behavior tab of the slider component, set the slider movement property to increment by 1 and set the maximum and minimum limit as fixed
6. In the appearance tab of the slider component, disable the ticks and deselect the Title, Value and Limits property
7. Now set the dynamic visibility of the image components so that ‘Units’ image is visible when cell C1 is 0 and ‘Amount’ image is visible when cell C1 is 1.
8. For both the image components, make sure ‘Block Mouse Events’ property is unchecked.
9. In the object browser, your components should be ordered like shown below, so that the slider component is not visible to the user
Now based on the value of cell C1, you may display different charts for Units and Amount and you will get the look and feel of an iOS platform switch.
Have fun!!!
--END
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 | |
3 | |
3 |