                                                  d3.select(this).attr("stroke", linecolor)
                                                  martip.hide()
 
+
+        direction = if horizontal then "north" else "east"
+        martip = d3panels.tooltip_create(d3.select("body"), markers, {direction:direction,tipclass:tipclass}, (d,i) -> "#{i} (#{markerpos[i]})")
+
         # move box to front
         myframe.box().raise()
 

    # function to remove chart
    chart.remove = () ->
                      svg.remove()
                      martip.destroy()
                      return null

    # return the chart function

        for i of data.marker
            markerpos[data.marker[i]] = d3.format(".1f")(data.pos[i])

        markers = svg.append("g").attr("id", "points")
        markerSelect =
            markers.selectAll("empty")
