   round_max_value: (max) ->
     rounded = d3.round(max, 0)
     rounded += 1 if max > rounded
-    @_max_value = rounded
+    @max_value(rounded)
     @
 
   render: ->


  

  min_value: (value) ->
    if value or value is 0
      @_min_value = parseInt(value)
      return @
    @_min_value
   
  max_value: (value) ->
    if value
      @_max_value = parseInt(value)
      return @
    @_max_value


  y_padding: 30

  build_value_domain: ->
    keys = (key for key, _ of (@_strict_scale or @_key_scale or {}))
    min = d3.min(keys) or 0
    max = d3.max(keys) or 1

    @max_value(max, @_strict_scale) # force if strict_scale is defined
    @min_value(min, @_strict_scale) # force if strict_scale is defined

    @value_domain = d3.scale.linear()
      .domain([@min_value(), @max_value()]) # FIXME
