             daysInfo[day] = (weekDay, offset)
             
             let isDayOff = (weekDay == 1 || weekDay == 2)
-            offset += isDayOff ? 2 : Constants.COL_WIDTH
+            offset += isDayOff ? 2 : self.COL_WIDTH
             
             if existingDate.compare(toDate) != NSComparisonResult.OrderedAscending {
                 stop.memory = true


import Cocoa

struct Chart {
    
    struct Constants {
        static let COL_WIDTH = 20
        static let ROW_HEIGHT = 20
        static let LEFT_MARGIN_WIDTH = 20
        static let TOP_MARGIN_HEIGTH = 100
    }
    
    var dateFormatter: NSDateFormatter = {
        let df = NSDateFormatter()

        return daysInfo
    }
    
    func rectForDay(offset:Int, rowIndex:Int, canvasHeight:Int) -> Rect {
        
        let COL_WIDTH = self.COL_WIDTH
        let ROW_HEIGHT = self.ROW_HEIGHT
        let LEFT_MARGIN_WIDTH = self.LEFT_MARGIN_WIDTH
        let TOP_MARGIN_HEIGTH = self.TOP_MARGIN_HEIGTH
        
        let p = P(
            LEFT_MARGIN_WIDTH + offset,
