Is it possible to remove the 0 values from charts?

Wondering if anyone has a way to remove the 0 values from charts as it provides no value to my users.

Several ways.

You can create a snippet to remove the points from the series.
You can manually create a condition in XML where the value != 0.
You can create a condition on the model that filters out anything where the value is 0.

I’m using an aggregate model and not sure how to tackle any of these recommendations. 

Hi Joe,

When you’re building your aggregate model, are the zero values just the results of a group sum (or count) totaling 0? In other words, it would help to understand more about what the zeros look like in the model itself, to see if any of Pat’s suggestions could be leveraged.

Can you copy the SOQL generated by the model? Alternatively, can you copy the XML for the page along with the name/id of the model being used in the chart.

Josef,

I think the easiest approach is to add the ‘Having’ clause to the XML. Skuid’s API supports adding the ‘Having’ clause to the SOQL, but there is no user interface to add this XML to the page. Here is a write up from Zach: http://community.skuid.com/skuid/topics/filter_on_count

Here is the XML to add. It goes just below the ‘groupby’ XML.

    

```
Here is a sample page that shows the count of Tasks by Owner where the Count>5.

Thanks,

Bill


```

    
        
            
                
            
            
            
            
                
                
            
            
                
            
        
    
    
        
            
                
                
            
            
            
            
                
            
        
    
    
        
        
        
        
    
    
        
    

```

I learned something new today! Never seen this before!

The chart is rendering fine, but is still loading “0” values.

Hey Mark,
 
The zero values are a result of a group count.

Here is the model’s SOQL:

SELECT COUNT(Id) countId,COUNT(Id) TeamAverage,OwnerId ownerId,Owner.Name ownerName,Type type FROM Task WHERE (Type in (‘Call’,‘Call Connect’,‘Email’,‘Email connect’,‘Face to Face Meeting’,‘AE Connect’,‘Left Voice Mail’))AND(OwnerId in (‘005800000091XI2AAM’,‘0058000000CN9woAAD’,‘0058000000EfaU1AAJ’,‘0058000000Eg02CAAR’)) GROUP BY OwnerId,Owner.Name,Type HAVING (COUNT(Id) > 0)

Looks like there’s not really a simple answer here, but you can do this with a before render snippet using the highcharts api:

https://stackoverflow.com/questions/49421548/want-to-hide-column-having-0-value-in-highchart-basic-c…

Apparently you may also be able to get highcharts to do the right thing if you replace the 0 values with null.

Matt,

This is a cool find.  It means you can ‘hide’ the ‘0’ values (or any ‘x’ value) using a formula field.  Something like this:

IF({{countId}}>10,{{countId}},“”)

Just change you chart to use the formula field instead of ‘countId’.

Thanks!

Bill