         configurePaddings(graph: newGraph)
         if trend != nil {
             configurePlotSpace(graph: newGraph, trend: trend!)
-            configureAxes(graph: newGraph)
+            configureAxes(graph: newGraph, trend: trend!)
 
             let boundLinePlot = styledPlot(trend: trend!)
             boundLinePlot.dataSource = self


            // y axis located at x coordinate == y.orthogonalPosition
            y.orthogonalPosition    = 0.0
            y.labelExclusionRanges  = [
                //CPTPlotRange(location: 0.99, length: 0.02),
                //CPTPlotRange(location: 1.99, length: 0.02),
                //CPTPlotRange(location: 3.99, length: 0.02)
            ]

            guard let trendUnwrapped = trend else { return }
            switch trendUnwrapped {
            case .bg:
                y.majorIntervalLength   = 10
                y.minorTicksPerInterval = 1

        }
    }

    class func rangeMaximum(trend: Trend) -> Double {
        switch trend {
        case .bg:
            return 300.0
        case .ha1c:
            // TODO: set to maximum of all readings
            return 11.0
        }
    }

    class func rangeMinimum(trend: Trend) -> Double {
        switch trend {
        case .bg:
            return 0.0
        case .ha1c:
            return 5.0
        }
    }
    
    func configureAxes(graph: CPTXYGraph, trend: Trend) {

        let axisSet = graph.axisSet as! CPTXYAxisSet

