Learning how to use d3-drag for an interactive "Make a guess" connected dot plot. Dragging is limited to the x-axis and the ends of the line cannot cross over (i.e. their positions cannot be switched). Clicking reset returns the dots to their original positions.
https://d3js.org/d3.v4.min.js