on 2021 Feb 12 5:26 PM
Another SAC App Designer scripting question
I'd like to be able to use a script to drill down in a waterfall chart, the setHierarchylevel() parameter doesn't work
so think I need to use the expandNode() parameter.
I'm struggling to get my head round the expandNode syntax, the Developer guide isn't very clear (to me at least)
If anyone has a working example of this it'd be much appreciated
Example
Waterfall chart containing:
3 Measures - m1, m2, m3
1 Dimension which is part of a hierarchy "Group" > "Row"
The 'expand node' button in the below screenshots is where i'm testing syntax to try and get it working.
1. Waterfall chart
2. Via the UI - the 'expand group' icon functionality is what I'm trying to perform programmatically
(the eventual aim being that the node is expanded during a radio button onClick event)
3. The desired result - the Waterfall chart showing the expanded node / lower hierarchy level
Page 51 of the Developer Handbook provides the following example:
// One node (Location="California") is expanded
Chart_1.getDataSource().expandNode("Location_4nm2e04531",
{ "Location_4nm2e04531": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]",
// California "@MeasureDimension": "[Account_BestRunJ_sold].[parentId].&[Discount]" });
Request clarification before answering.
I'm also trying to use getDataSource().expandNode() to do drill down. It can achieve the requirement, but the tables are keep refreshing after I triggered the expandNode(). Did anyone face this problem before?
I want to achieve click on Year level for one table, all tables drill down to Quarter level. Test script is as below:
G_Selection = Table_2.getSelections();
console.log(["Selections",G_Selection]);
var selection = G_Selection[0];
//console.log(["selection", selection]);
var valMeasure = Table_2.getDataSource().getResultMember("@MeasureDimension",selection);
//var valTime = Table_2.getDataSource().getResultMember("Time",selection);
//console.log(["valMeasure", valMeasure]);
//console.log(["valTime", valTime]);
var expandflag = 0;
//Check whether it's column header
if (valMeasure === undefined)
{
Table_2.getDataSource().expandNode("Time",selection);
Table_1.getDataSource().expandNode("Time",selection);
expandflag = 1;
}
Best Regards & Thanks,
Lilu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
46 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.