       ["index",         "$index"    ]
       ["data (x, y)",   "($x, $y)"  ]
       ["canvas (x, y)", "($sx, $sy)"]
-    ]] # TODO (bev)
+    ]]
     formatters:   [ p.Any,    {}             ]
     renderers:    [ p.Array,  []             ]
     names:        [ p.Array,  []             ]

    x = xscale.invert(vx)
    y = yscale.invert(vy)

    for i in indices['0d'].indices
      data_x = renderer_view.glyph._x[i+1]
      data_y = renderer_view.glyph._y[i+1]
      ii = i

      switch @model.line_policy
        when "interp" # and renderer.get_interpolation_hit?
          [data_x, data_y] = renderer_view.glyph.get_interpolation_hit(i, geometry)
          rx = xscale.compute(data_x)
          ry = yscale.compute(data_y)

        when "prev"
          rx = canvas.sx_to_vx(renderer_view.glyph.sx[i])
          ry = canvas.sy_to_vy(renderer_view.glyph.sy[i])

        when "next"
          rx = canvas.sx_to_vx(renderer_view.glyph.sx[i+1])
          ry = canvas.sy_to_vy(renderer_view.glyph.sy[i+1])
          ii = i+1

        when "nearest"
          d1x = renderer_view.glyph.sx[i]
          d1y = renderer_view.glyph.sy[i]
          dist1 = hittest.dist_2_pts(d1x, d1y, sx, sy)

          d2x = renderer_view.glyph.sx[i+1]
          d2y = renderer_view.glyph.sy[i+1]
          dist2 = hittest.dist_2_pts(d2x, d2y, sx, sy)

          if dist1 < dist2
            [sdatax, sdatay] = [d1x, d1y]
          else
            [sdatax, sdatay] = [d2x, d2y]
            ii = i+1

          data_x = renderer_view.glyph._x[i]
          data_y = renderer_view.glyph._y[i]
          rx = canvas.sx_to_vx(sdatax)
          ry = canvas.sy_to_vy(sdatay)

        else
          [rx, ry] = [vx, vy]

      vars = {index: ii, x: x, y: y, vx: vx, vy: vy, sx: sx, sy: sy, data_x: data_x, data_y: data_y, rx:rx, ry:ry}


      tooltip.add(rx, ry, @_render_tooltips(ds, ii, vars))


      # multiglyphs will set '1d' and '2d' results, but have different tooltips
      if not isEmpty(indices['2d'].indices)
        for i, [j] of indices['2d'].indices
          data_x = glyph._xs[i][j]
          data_y = glyph._ys[i][j]
          jj = j

          switch @model.line_policy
            when "interp" # and renderer.get_interpolation_hit?
              [data_x, data_y] = glyph.get_interpolation_hit(i, j, geometry)
              rx = xscale.compute(data_x)
              ry = yscale.compute(data_y)

            when "prev"
              [[rx, ry], jj] = _line_hit(canvas, glyph.sxs[i], glyph.sys[i], j)

            when "next"
              [[rx, ry], jj] = _line_hit(canvas, glyph.sxs[i], glyph.sys[i], j+1)

            when "nearest"
              [[rx, ry], jj] = _nearest_line_hit(canvas, j, geometry, sx, sy, glyph.sxs[i], glyph.sys[i])
              data_x = glyph._xs[i][jj]
              data_y = glyph._ys[i][jj]

          vars = {index: i, segment_index: jj, x: x, y: y, vx: vx, vy: vy, sx: sx, sy: sy, data_x: data_x, data_y: data_y}

