 
       bars.classed('max', (d, i) -> d.value == max)
 
-    setInterval update, 5000
+    @updateInterval = setInterval update, 5000
 
   toggle: (@stats) ->
     if @hasParent()


  detach: ->
    super()
    @rootView.focus()

    super

  draw: ->
    @editorStats.empty()
    @x ?= d3.scale.ordinal().domain d3.range(@stats.hours * 60)
    @y ?= d3.scale.linear()
    w = @rootView.vertical.width()
