Prevents a crash when a time period has zero count

Bar height was being calculated as NaN (zero divided by a number) and then `CGContextAddLineToPoint` would crash due to the invalid inputs.  Updated the calculation method to return height of zero if count is zero.