     @y ?= d3.scale.linear()
     w = @rootView.vertical.width()
     h = @height()
-    [pt, pl, pb, pr] = [15, 10, 3, 25]
-
     data = d3.entries @stats.eventLog
 
-    @x.rangeBands [0, w - pl - pr], 0.2
-    @y.range [h - pt - pb, 0]
+    @x.rangeBands [0, w - @pl - @pr], 0.2
+    @y.range [h - @pt - @pb, 0]
 
     @xaxis ?= d3.svg.axis().scale(@x).orient('top')
-      .tickSize(-h + pt + pb)
+      .tickSize(-h + @pt + @pb)
       .tickFormat (d) =>
         d = new Date(@stats.startDate.getTime() + (d * 6e4))
         mins = d.getMinutes()

    @div class: 'editor-stats-wrapper', tabindex: -1, =>
      @div class: 'editor-stats', outlet: 'editorStats'

  initialize: (@rootView) ->
    super

    @subscribe $(window), 'resize', _.debounce((=> @draw()), 300)

  draw: ->
    @editorStats.empty()

      .attr('width', @x.rangeBand())
      .attr('class', 'bar')

    @updateInterval = setInterval((=> @update()), 5000)

  update: ->
    newdata = d3.entries @stats.eventLog
    max  = d3.max newdata, (d) -> d.value
    @y.domain [0, max]
    h = @height()
    @bars.data(newdata).transition()
      .attr('height', (d, i) =>  h - @y(d.value) - @pt - @pb)
      .attr('y', (d, i) => @y(d.value))
    @bars.classed('max', (d, i) -> d.value == max)

  toggle: (@stats) ->
    if @hasParent()
