svg.selectAll(".line")
.on("mouseover", function(d) {
var xPosition = d3.event.pageX;
var yPosition = d3.event.pageY;
var year = x.invert(xPosition).getFullYear();
var arrests = d.values.filter(function(v) { return v.year.getFullYear() === year; })[0];
d3.select("#tooltip")
.style("left", xPosition + "px")
.style("top", yPosition + "px")
.select("#value")
.text(d.name + " " + arrests.arrests);
--
You received this message because you are subscribed to the Google Groups "d3-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.