         if markedRange is NSRange {
             let range : NSRange = markedRange as! NSRange
             if  range.length > 0 {
-                let (x0,y0) = (barStartX, Double(range.location) * currentItemHeight)
-                let (x1,y1) = (viewWidth, Double(range.location + range.length) * currentItemHeight)
-                let rectanglePath = UIBezierPath(roundedRect: CGRect(x: CGFloat(x0!), y: CGFloat(y0), width: CGFloat(x1), height: CGFloat(y1)), cornerRadius: 10)
-                currentColor.setFill()
+                let (x0,y0) = (properties.barStartX, Double(range.location) * properties.currentItemHeight)
+                let (x1,y1) = (viewWidth, Double(range.location + range.length) * properties.currentItemHeight)
+                let rectanglePath = UIBezierPath(roundedRect: CGRect(x: CGFloat(x0), y: CGFloat(y0), width: CGFloat(x1), height: CGFloat(y1)), cornerRadius: 10)
+                properties.currentColor.setFill()
                 rectanglePath.fill()
             }
         }

            if ( min > 0 ) {
                min = 0
            }
            let width : Double = viewWidth - barStartX
            for i in 0..<currentArray.count {
                let y = Double(i) * currentItemHeight
                let barHeight : CGFloat = CGFloat(currentItemHeight - 2)
                let object : AnyObject? = currentArray.object(at: i) as AnyObject?
                if object != nil {
                    if self.isObjectANumber(object) {
                        let d = getDoubleForObject(object)
                        var x0Line : Double = barStartX
                        if ( min < 0 ) {
                            x0Line = barStartX + getPercentageInRange(-min, min: min, max: max) * width
                        }
                        var rectPath : UIBezierPath
                        if ( d > 0 ) {
                            let posBarWidth = getPercentageInRange(d!, min: min, max: max) * width
                            rectPath = UIBezierPath(rect: CGRect(x: CGFloat(x0Line),y: CGFloat(y+1),width: CGFloat(posBarWidth),height: barHeight))
                        } else {
                            let negBarWidth = getPercentageInRange(-d!, min: min, max: max) * width
                            rectPath = UIBezierPath(rect: CGRect(x: CGFloat(x0Line - negBarWidth),y: CGFloat(y+1),width: CGFloat(negBarWidth),height: barHeight))
                        }
                        currentColor.setFill()
                        rectPath.fill()
                    }
                }

    internal func drawObjectDescriptions(_ xPos:Double) {
        let paragraphStyle = NSParagraphStyle.default.mutableCopy() as! NSMutableParagraphStyle
        paragraphStyle.lineBreakMode = NSLineBreakMode.byTruncatingTail
        let textFontAttributes: [String: Any] = [NSFontAttributeName: UIFont.boldSystemFont(ofSize: CGFloat(properties.currentFontHeight)), NSForegroundColorAttributeName: properties.currentColor, NSParagraphStyleAttributeName: paragraphStyle]
        for i in 0..<currentArray.count {
            let y = Double(i) * properties.currentItemHeight
            let desc = objectDescription(currentArray.object(at: i) as AnyObject?)
            desc.draw(at: CGPoint(x: CGFloat(xPos), y: CGFloat(y)), withAttributes: textFontAttributes)
        }
    }
    
    fileprivate func arrayHasNumber()->Bool {
        for i in 0..<currentArray.count {
            let object : AnyObject? = currentArray.object(at: i) as AnyObject?
            if utils.isObjectANumber(object) {
                return true
            }
        }
