   y_padding: 30
 
   build_value_domain: ->
-    if @_strict_scale
-      keys = (key for key, _ of @_strict_scale)
-      @max_value(d3.max(keys))
-      @min_value(d3.min(keys))
+    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


  

  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


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

  render: ->
