hide empty segment in a donut chart

Hello,

Anyone would know of a way to hide segments (category) in a donut chart when there are equal to 0 ?


In the example below, i would like to be able to only see the 2 categories >0 (red and orange one) the other 4 should not even show at all

 





Thx

Dave,

The short answer is that Charts show whatever is in your model data, so if it’s in the model, even with a zero value, it’ll still show. The only way to get rid of them without writing some code at this point is to not have them included in your model. If that’s not an option, you can use a Before Render Snippet (see this and this for some good community resources) to remove the series that you don’t want shown. 

Dave would a ‘having’ condition work for you?  You could filter for results greater than zero.  Here is  a link on how to do this.

https://community.skuidify.com/skuid/topics/filter_on_count