Forum Discussion

cglowe's avatar
cglowe
Cloud Apps
12-20-2024
Solved

Disable single slice of pie chart

On a pie chart, where the 'Others' slice is enabled, is there a way disable the click action for only the 'Others' slice? We have some instances where the Others slice contains several hundred members and can crash the page. Ideally, we'd like the user to still be able to click other slices to filter their dashboard, but not be able to click the Others slice.

  • Hi cglowe ,

    Here is a small script that makes the "Others" slice behave similarly to the other slices. This means that when you click on it, it won't display the underlying items. Instead, it will apply a dashboard filter for those items. Is this what you're looking for?

    widget.on('processresult', function(w, args){
    	args.result.drilldown = undefined
    })

     

    result:

     

    Let me know if you need any more adjustments!

     

    -Hari

    www.binextlevel.com 

4 Replies

  • harikm007's avatar
    harikm007
    Data Warehouse

    Hi cglowe ,

    Here is a small script that makes the "Others" slice behave similarly to the other slices. This means that when you click on it, it won't display the underlying items. Instead, it will apply a dashboard filter for those items. Is this what you're looking for?

    widget.on('processresult', function(w, args){
    	args.result.drilldown = undefined
    })

     

    result:

     

    Let me know if you need any more adjustments!

     

    -Hari

    www.binextlevel.com 

  • Hi cglowe I do not think that it is possible to limit the selection feature to exclude the "others" slice from it. I would suggest to see if disabling "others" slice would work or maybe disabling the selection feature for this widget so users would not crash the page accidentally.  

    You can try to develop a JS script to see if it can be done this way. If you get any specific question during script writing feel free to Submit a Support Request

  • Hello cglowe,

    I’m following up to see if any of the solutions offered worked for you.

    If so, please click the 'Accept as Solution' button on the appropriate post. That way other users with the same questions can find the answer. If not, please let us know so that we can continue to help.

    Thank you.

  • Hari's script achieved what I was looking for.  There are small quirks with it, where you can't click the pie slice to unfilter, but it's close enough.