cancel
Showing results for 
Search instead for 
Did you mean: 

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

former_member197738
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

MustafaBensan
Active Contributor

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.

former_member197738
Participant
0 Kudos

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.

Answers (3)

Answers (3)

TammyPowlas
Active Contributor

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

former_member197738
Participant
0 Kudos

Hi Tammy,

Slight clarification. Please review screenshot.

TammyPowlas
Active Contributor
0 Kudos

could you share a screen shot of the outline view?

former_member197738
Participant
0 Kudos

thanks Tammy/Mustafa

former_member197738
Participant
0 Kudos

please see below video, thanks

https://youtu.be/txAzZ-hrYSg

TammyPowlas
Active Contributor
0 Kudos

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