           additional = difference / (vars[axis].ticks.values.length - 1)
           additional = additional / 2
 
-          rangeMax = vars[axis].scale.viz.range()[1]
+          rangeMax = testScale.range()[1]
           maxSize  = vars.axes.scale.range()[1] * 1.5
-          domainLow = vars[axis].scale.viz.invert -maxSize
-          domainHigh  = vars[axis].scale.viz.invert rangeMax + maxSize
+          domainLow = testScale.invert -maxSize
+          domainHigh  = testScale.invert rangeMax + maxSize
 
           if domain[0] - additional < domainLow
 

            (buffer is "y" and axis.indexOf("y") is 0) or
            (buffer is true)

      domain = vars[axis].scale.viz.domain()

      allPositive = domain[0] >= 0 and domain[1] >= 0
      allNegative = domain[0] <= 0 and domain[1] <= 0

            domain = [domainLow, domainHigh]
            domain = domain.reverse() if axis.indexOf("y") is 0

            domainCompare = testScale.domain()
            domainCompare = domainCompare[1] - domainCompare[0]

            unless domainCompare
