         level = Math.round(level/levelstep)*levelstep
         level = Math.min(level, maxlevel)
         level = Math.max(level, minlevel)
+        if level <= binlevel
+            level = 1
         
         # TODO: There are a lot faster methods!
         x = datac[0].orig_x
         for i in [0...x.length]
             break if x[i] >= range[0]
-        start = i
+        start = Math.max 0, i-1
         for i in [i...x.length]
             break if x[i] > range[1]
-        end = i
+        end = i+1
 
         for h in datac
             # TODO! Handle the boundaries properly!

                    h.cache[level] = smooth(h.orig_y, level)
            h.y = h.cache[level][start...end]
            h.x = h.orig_x[start...end][...h.y.length]
        return datac
    getter.extent = d3.extent datac[0].x
    getter.keys = (d.key for d in datac)
    return getter


        #stack = d3.layout.stack()
        #.values((d) -> d.values)
        draw = -> res_data(x.domain()).done (data, opts) ->
            opts ?= {}
            area.interpolate opts.interpolate ? "linear"

            d.y0 = [] for d in data
            for ix in [0...data[0].y.length]
                y0 = 0
