   d3 = require 'd3.v3'
   x  = d3.scale.ordinal().domain d3.range(hours * 60)
   y  = d3.scale.linear()
+
+  xaxis = d3.svg.axis().scale(x)
+    .orient('top')
 
   @activate: (rootView, state) ->
     @instance = new EditorStatsView(rootView, state?.eventLog)

    while date < future
      @eventlog[time(date)] = 0

    console.log @eventlog
    @rootView.on 'keydown', @track
    @rootView.on 'mouseup', @track

  draw: ->
    w = @.width()
    h = @.height()
    [pt, pl, pb, pr] = [5,0,0,0]

    data = d3.entries @eventlog

    x.rangeRoundBands [0, w - pl - pr], 0.1
    y.range [h, 0]

    vis = d3.select(@.get(0)).append('svg')
      .attr('width', w)
      .attr('height', h)
    .append('g')
      .attr('transform', "translate(#{pl},#{pt})")

    bars = vis.selectAll('rect.bar')
      .data(data)

    super

    @command 'core:cancel', @detach
    @statusBar = @rootView.find '.status-bar'

    date = new Date()
    future = new Date(date.getTime() + (36e5 * hours))
