Skip to Content

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

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    May 11, 2017 at 01:15 AM

    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.

    Add comment
    10|10000 characters needed 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.

  • May 10, 2017 at 05:46 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • May 10, 2017 at 08:41 PM

    please see below video, thanks

    https://youtu.be/txAzZ-hrYSg

    Add comment
    10|10000 characters needed characters exceeded

  • May 15, 2017 at 02:40 PM

    thanks Tammy/Mustafa

    Add comment
    10|10000 characters needed characters exceeded