     legend = d3.select(container).append('ul')
       .attr('class', 'legend')
 
+    currentCrosshairTime = null
 
     destroyFunctions = []
     destroy = ->

          .attr('fill', '#efefef')

      positionCrosshair = (x, time) ->
        vertical_crosshair
          .attr('x1', x)
          .attr('x2', x)

        positionCrosshair p.x, p.time
        cursorBus.push p.time

      boundedPositionCrosshair = (time) ->
        domain = x.domain()
        if time < domain[0]
          time = domain[0]
        else if time > domain[1]
          time = domain[1]
        positionCrosshair x(time), time

      if currentCrosshairTime?
        boundedPositionCrosshair(currentCrosshairTime)
      # TODO if the mouse is over the graph, use that position so it doesn't jump

      destroyFunctions.push externalCursorChanges.onValue (time) ->
        boundedPositionCrosshair(time)

      target = g.selectAll('.target')
          .data(targets)
