This post describes how to build an area chart with d3.js. It is also possible to selection a section of the X axis (brushing) to zoom on it. This is a great use of interactivity since it allows to explore more in details the content of your data. This example works with d3.js v4
and v6
myArea
is added to the line. It allows to select this class later on to update the line position.on("dblclick",...)
function.