         height = 450 #height
         radiuso = 135 #outer radius
         radiusi = 90 #inner radius
+        radius = height / 2
         labelRadius = 180
 
         color = d3.scale.category20()

            
            #trig functions adjusted to use the angle relative
            #to the "12 o'clock" vector:
            d.cx = Math.sin(a) * (that.radius - 75)
            d.cy = -Math.cos(a) * (that.radius - 75)
            
            # calculate the default position for the label,
            #   so that the middle of the label is centered in the arc
            bbox = d3.getBBox()
            #bbox.width and bbox.height will 
            #describe the size of the label text
            labelRadius = that.radius - 20
            d.x =  Math.sin(a) * (labelRadius)
            d.l = d.x - bbox.width / 2 - 2
            d.r = d.x + bbox.width / 2 + 2
            d.y = -Math.cos(a) * (that.radius - 20)
            d.b = d.oy = d.y + 5
            d.t = d.y - bbox.height - 5 
            

  render: (data) ->
        #console.log("update pie", data);

        if !data
          data = @get("value")
        if !data
