This post describes how to build a line chart with zooming option in d3.js. Brushing is used to select the zone to zoom on. See more line chart examples here, and learn how to use brushing here.
line
is added to the line. It allows to select this class later on to update the line position.on("dblclick",...)
function.