         @aggregate timestamp
 
   render: ->
+    data = @getData()
+    busiestWeek = _.max data, (week) ->
+      week.total
     @$el.empty()
     svg = d3.select(@el)
       .attr('width', @chartWidth)

    
    # Each bar is actually contained in a g itself
    # That g also contains the number of hours for the bar as text
    data = @getData()

    groups = weeks.selectAll(".bar")
      .data(data)


  redrawChart: ->
    data = @getData()
    busiestWeek = _.max data, (week) ->
      week.total
    @heightScale = d3.scale.linear()
      .domain([0, busiestWeek['total']])
      .rangeRound([0, @height - 20])
    svg = d3.select(@el)
    groups = svg.selectAll("g.week").data(data)
        .attr("data-timestamp", (d) -> d.beginning_of_week)
