Skip to Content
0

DS_1.6 - Restrict outside are of Doughnut/any chart ??

May 10, 2017 at 04:25 PM

85

avatar image

Hi Everyone,

I'm doing the basic drill drown between 2 charts. Selection driven from Doughnut to Column chart.

I want to restrict the area around doughnut because that basically reset the view to query view ignoring my filters that i adjusted in "edit initial view'. I'm taking care of filters using script.

But is there a way to restrict area around pie ??

Please see screenshot for understanding

scn-filter4.png

scn-filter6.png

Appreciate your response

scn-filter4.png (39.8 kB)
scn-filter6.png (23.0 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Mustafa Bensan May 11, 2017 at 01:15 AM
1

Hi Mohd,

The reason behind your issue is that when a user clicks outside the donut chart in the chart area, the getSelectedMember() call in the "On Select" event of the chart returns "(ALL_MEMBERS)" as this triggers a "deselection" and your subsequent setFilter() call therefore returns all measures in the second chart, as illustrated below:

Single Selection:

Deselection:

So to workaround the above behaviour, in the "On Select" event of your donut chart you could wrap your setFilter() call in an if-then statement so that you only execute the filter if the selection value is NOT "(ALL_MEMBERS)". Your code would look something like this:

var selectedItem = me.getSelectedMember("<DIMENSION NAME>");

if (selectedItem.internalKey !== "(ALL_MEMBERS)") {	
	DS_2.setFilter("<DIMENSION NAME>", selectedItem);	
}

The only side-effect is that the donut chart will still appear in a de-selected state when the user clicks outside the chart area or clicks the same donut chart segment that is currently selected, which might seem confusing to the user but this could just be a matter of training, or perhaps you could maintain the selected state with CSS.

Regards,

Mustafa.


Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Mustafa,

Thank you so much for your time and kind explanation like always. I totally understand the concern with confusion here.

Your tweak with code is a great advise :-)

Initially i restricted at query level but it takes away a valuable information from the total employees segregated by race that are yet unassigned. Hence back to basics.

I guess there isn't much we can do at this stage, either the issue is addressed by sap itself as some form on settings.

0
Tammy Powlas
May 10, 2017 at 05:46 PM
1

Mohd- could you put your donut chart inside a panel/grid and that way navigation outside that area doesn't impact your application?

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Tammy,

Slight clarification. Please review screenshot.

scn-filter7.png (33.5 kB)
scn-filter8.png (19.3 kB)
0

could you share a screen shot of the outline view?

0
Mohd Fahad May 10, 2017 at 08:41 PM
0

please see below video, thanks

https://youtu.be/txAzZ-hrYSg

Show 1 Share
10 |10000 characters needed characters left characters exceeded

that's interesting, Mohd- I think it still may help to share an outline of the application

0
Mohd Fahad May 15, 2017 at 02:40 PM
0

thanks Tammy/Mustafa

Share
10 |10000 characters needed characters left characters exceeded