                                               desired_n_ticks)
 
   class AdaptiveScale extends AbstractScale
-    constructor: (@mantissas, @base=10.0, @min_magnitude=0.0,
-                  @max_magnitude=Infinity)->
+    constructor: (@mantissas, @base=10.0, @min_interval=0.0,
+                  @max_interval=Infinity)->
       super(['mantissas', 'base', 'min_magnitude', 'max_magnitude'])
-
-      @min_interval = _.first(@mantissas) * @min_magnitude
-      @max_interval =  _.last(@mantissas) * @max_magnitude
 
       prefix_mantissa =  _.last(@mantissas) / @base
       suffix_mantissa = _.first(@mantissas) * @base
-      @allowed_mantissas = _.flatten([prefix_mantissa, @mantissas,
-                                      suffix_mantissa])
-
-      @base_factor = if @min_magnitude == 0.0 then 1.0 else @min_magnitude
+      @extended_mantissas = _.flatten([prefix_mantissa, @mantissas,
+                                       suffix_mantissa])
+
+      @base_factor = if @min_interval == 0.0 then 1.0 else @min_interval
 
     get_interval: (data_low, data_high, desired_n_ticks) ->
       data_range = data_high - data_low

      ideal_mantissa = ideal_interval / ideal_magnitude

      # An untested optimization.
#       index = _.sortedIndex(@allowed_mantissas, ideal_mantissa)
#       candidate_mantissas = @allowed_mantissas[index..index + 1]
      candidate_mantissas = @allowed_mantissas

      errors = candidate_mantissas.map((mantissa) ->
        Math.abs(desired_n_ticks -


      return ticks_in_range

  ONE_MILLI = 1.0
  ONE_SECOND = 1000.0
  ONE_MINUTE = 60.0 * ONE_SECOND
  ONE_HOUR = 60 * ONE_MINUTE
