         .style('visibility', (d) -> if d.value? then 'visible' else 'hidden')
 
 
-    mousePosition.onValue (p) ->
+    destroyFunctions.push mousePosition.onValue (p) ->
       positionCrosshair p.x, p.time
       cursorBus.push p.time
 


  color = d3.scale.ordinal()

  mouseOver = new Bacon.Bus
  mouseOut = new Bacon.Bus
  clicks = new Bacon.Bus
  mouseMoves = new Bacon.Bus

  area = d3.svg.area()


  draw = (data, params) ->
    destroy()

    mouseOver = new Bacon.Bus
    mouseOut = new Bacon.Bus
    clicks = new Bacon.Bus

    if params?.fgcolor
      computedParams = _.object _.map fgColorParams, (k) -> [k, params.fgcolor]
    else
