Suggested answer to an SO question on filling a segment of an area between two paths
A linearGradient is created and used as fill on the area between two lines. And then a rect with 0 opacity has mousemove event attached, which uses the mouse's position to update a linearGradient's offsets' proportions.
forked from tomshanley's block: Area segment fill using gradient to pre-calculate each coordinate on each path, so that the interaction is smoother.
Built with blockbuilder.org
https://d3js.org/d3.v4.min.js