I’ve tried inspecting the DOM and so forth, and am not sure why ‘.tooltip’ is appended to the handler. It doesn’t effect anything if removed, and seemingly has no significant value:
g.selectAll("circle")
//
//why is .tooltip appended here?
//
.on("mouseover.tooltip", function(d) {
d3.select("text#" + d.line_id).remove();
d3.select("#chart")
.append("text")
.text(d.late_percent + "%")
.attr("x", time_scale(d.time) + 10)
.attr("y", percent_scale(d.late_percent) - 10)
.attr("id", d.line_id);
});
Any clarification is much appreciated.
It’s a namespace
http://api.jquery.com/on/
http://docs.jquery.com/Namespaced_Events