This post follows the previous basic line chart with d3.js. It describes how to add a cursor that displays the exact value of the nearest X axis value. See more line chart examples in the dedicated section.
style("pointer-events", "all")
d3.bisector()
function.