         return Double(maxValue)
     }
     
-    private var minValue: Int
-    private var maxValue: Int
+    private var minValue: Double
+    private var maxValue: Double
     private let minSpace: CGFloat
     private let nice: Bool
     private let preferredDividers: Int
     
     private let maxTextSize: CGFloat
     
-    public init(minValue: Int, maxValue: Int, preferredDividers: Int, nice: Bool, formatter: NSNumberFormatter, font: UIFont, minSpace: CGFloat = 10) {
+    public init(minValue: Double, maxValue: Double, preferredDividers: Int, nice: Bool, formatter: NSNumberFormatter, font: UIFont, minSpace: CGFloat = 10) {
         
         self.minValue = minValue
         self.maxValue = maxValue

        return max(minNumberTextSize, maxNumberTextSize) + remainingWidth
    }
    
    public func calculateFittingRangeAndFactor(axis: ChartAxis) -> (min: Int, max: Int, factor: Double)? {
        
        if nice {
            let niceMinMax = self.nice(minValue: Double(minValue), maxValue: Double(maxValue))
            self.minValue = Int(niceMinMax.minValue)
            self.maxValue = Int(niceMinMax.maxValue)
        }
        
        let growDelta = Int(pow(10, round(log10(Double(min(abs(minValue), abs(maxValue)))))))
        
        let length = maxValue - minValue
        let maxDelta = length / 6 // try to expand range to the left/right of initial range
        
        var fittingFactorsPerDelta = [(min: Int, max: Int, factor: Double)]()
        var currentDelta = 0
        var counter = 0 // just in case
        while(currentDelta < maxDelta && counter < 100) {
            let min = minValue - currentDelta
            let max = maxValue + currentDelta
            if let fittingFactor = findFittingFactor(axis, modelLength: max - min) {
                fittingFactorsPerDelta.append((min, max, Double(fittingFactor)))
            }


            counter += 1
        }
        
        var maxFittingFactorOpt: (min: Double, max: Double, factor: Double)?
        for f in fittingFactorsPerDelta {
            
            if let maxFittingFactor = maxFittingFactorOpt {
