         plotSpace.xRange = TrendViewController.xRange(trendsAlgorithmModel: trendsAlgorithmModel,
                                                       trend: trend)
 
-        plotSpace.globalYRange = TrendViewController.globalYRange(trendsAlgorithmModel: trendsAlgorithmModel,
-                                                                  trend: trend)
+        plotSpace.globalYRange = TrendViewController.globalYRange(trend: trend)
         plotSpace.yRange = plotSpace.globalYRange!
     }
 

        if coordinate == CPTCoordinate.X {
            axisSet.yAxis?.orthogonalPosition = NSNumber(value:(range.location.doubleValue + TrendViewController.yAxisLabelWidth))
            //axisSet.xAxis?.titleLocation = CPTDecimalFromDouble(range.locationDouble + (range.lengthDouble / 2.0)) as NSNumber?
        } else {
            axisSet.xAxis?.orthogonalPosition = range.location
            //axisSet.yAxis?.titleLocation = CPTDecimalFromDouble(range.locationDouble + (range.lengthDouble / 2.0)) as NSNumber?
        }
        return range

        return range
    }

    class func globalYRange(trend: Trend) -> CPTPlotRange {
        let length = NSNumber(value:TrendViewController.rangeMaximum(trend: trend)
            + TrendViewController.xAxisLabelHeight(trend: trend))
        let range = CPTPlotRange(location: NSNumber(value: -xAxisLabelHeight(trend: trend)),
                                 length: length)
        return range
    }
    
    class func xAxisLabelHeight(trend: Trend) -> Double {
        switch trend {
        case .bg:
            return 5.0
        case .ha1c:
            return 0.5
        }
    }

    class func rangeMaximum(trend: Trend) -> Double {
        switch trend {
        case .bg:
            return 120.0
        case .ha1c:
            return 11.0
        }
    }

    func configureAxes(graph: CPTXYGraph) {
