   data: []
   svg: null
   patient: null
+  padding: 5
+  size: 600
 
   didInsertElement: ->
     svg = d3.select(@element).select("svg")
-    data = this.get('data')
-    padding = 5
-    width = height = 600 - 2 * padding
+    data = @get('data')
+    width = height = @get('size') - 2 * @get('padding')
 
     outerRadius = d3.min([width, height])/2
     radius = outerRadius *.95

      .attr("fill-opacity", (d) -> opacityScale(d.data.risk))

      .on("click", (d) =>
        svg.selectAll(".category").classed("active", false)
        svg.selectAll(".category#{d.data.name}").classed("active", true)
        @set('selectedCategory', @get('patient.categoryDisplay').findBy('name', d.data.name))
      )

      .on("dblclick", (d) ->

    svg = d3.select(@element).select("svg")
    return unless svg?
    data = @get('data')
    width = height = @get('size') - 2 * @get('padding')
    tip = d3.tip()
      .attr('class', 'd3-tip')
      .html((d) -> d.data.name)
