           @sy[i] = Math.round(syi[i])
         else
           @sy[i] = syi[i]
+      @max_width = _.max(@width)
+      @max_height = _.max(@height)
+
+    _set_data: () ->
+      @index = rbush()
+      @index.load(
+        ([@x[i], @y[i], @x[i], @y[i], {'i': i}] for i in [0...@x.length])
+      )
 
     _render: (ctx, indices, glyph_props, sx=@sx, sy=@sy, sw=@sw, sh=@sh) ->
       if glyph_props.fill_properties.do_fill


        ctx.stroke()

    draw_legend: (ctx, x0, x1, y0, y1) ->
      reference_point = @get_reference_point() ? 0



define [
  "underscore",
  "rbush",
  "renderer/properties",
  "./glyph",
], (_, rbush, Properties, Glyph) ->

  class RectView extends Glyph.View

