that sounds like a good way of doing it. This function I've written identifies the correct point I should be displaying a tooltip for, but the event only triggers when my mouse is moving over one of the lines in my graph. How would I get it to trigger the event for the area of the entire top-level <svg> tag, not just drawn elements inside it?
var svg = d3.select("#graphs_table tr:last-child td." + row).append("svg:svg")
.attr("width", w + m[1] + m[3])
.attr("height", h + m[0] + m[2])
.append("g")
.attr("transform", "translate(" + m[3] + "," + m[0] + ")");
svg.on("mousemove", function()
{
var x = d3.svg.mouse(this)[0];
var index = Math.round((x/w)*num_points); //w is width
console.log(x, w, index);
});
imran