on 2025 Feb 12 7:23 AM
I have a numeric point chart which shows some value & this value is coming from a filter / input_control in SAC.
I want to use a button to switch between a numeric value & a percentage value in the chart. Is this possible to achieve? Kindly share solutions, if possible!
Request clarification before answering.
You could also just configure two separate measures. So have one calculated measure configured to show the value, and then another configured to show the value as a percentage. Then write a small script to place on a button or whatever input control you like that will toggle which measure is displayed in the numeric point chart.
Script to toggle would look something like:
// Define measure IDs
var measure1 = "77373615-5410-4254-3668-914452161766";
var measure2 = "19715775-8237-4549-3898-205003124717";
// Get the currently assigned measures
var currentMeasures = Chart_1.getMembers(Feed.ValueAxis);
// Check which measure is currently displayed and toggle
if (currentMeasures.includes(measure1)) {
Chart_1.removeMember(Feed.ValueAxis, measure1);
Chart_1.addMember(Feed.ValueAxis, measure2);
} else {
Chart_1.removeMember(Feed.ValueAxis, measure2);
Chart_1.addMember(Feed.ValueAxis, measure1);
}Cheers, Ivan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This is very much possible. create a two widgets one with numeric and another one widget using %.
hide the % widget by default. create a push button,in this push button write a script 'on click' event.
widget2.visible = true. ( widget1.visible = false).
In this way you can control the widgets. Please note this can be achieved using : Optimized story experience mode only. meaning the latest recommended SAC Story. (which comes with advanced mode of scripting).
thanks with regards
Giri
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 | |
| 6 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.