     @
 
   redrawBar: (options) ->
-    window.heightScale = @heightScale
+    busiestWeek = _.max options, (week) ->
+      week.total
     svg = d3.select('svg g.weeks')
     # Find the <g> that groups the two <rect> elements used for the total and the proposed hours
     # and assign the new data to it


  redrawChart: ->
    data = @getData()
    svg = d3.select(@el)
    groups = svg.selectAll("g.week").data(data)
        .attr("data-timestamp", (d) -> d.beginning_of_week)

        @aggregate timestamp

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