Skip to Content
0

infochart getselectedmember

Oct 18, 2016 at 09:02 AM

102

avatar image
Former Member

Hi all,

Question regarding infocharts:

I'm using a stacked column chart, so I have dimension A on the x-axis and dimension B as stacks in the chart. I'm using the chart as a filter, through a setFilter command, but I have to give up a dimension in that command. Is there a way I could get it to dynamically get either dimension A or Dimension B, based on what I,m clicking in the chart?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Oct 21, 2016 at 12:22 PM
0

Hi Roy,

You can use the legends as selector to achieve your requirement. Let us consider DIMENSION_B is in legends and when we select on a legend the length of selected array will be overall count of DIMENSION_A which will be greater than 1. So we can filter DIMENSION_B at that instance based on selected legend value.

Then using an if...else function we can filter the DIMENSION_A in the else part as shown below.

if(INFOCHART_1.getSelectedMembers("DIMENSION_A").length>1)

{

DS_2.setFilter("DIMENSION_B", INFOCHART_1.getSelectedMember("DIMENSION_B"));

}

else

{

DS_2.setFilter("DIMENSION_A", INFOCHART_1.getSelectedMember("DIMENSION_A"));

}

Share
10 |10000 characters needed characters left characters exceeded