title: d3.js guidance on interactive scrolling an svg element
body: <p>I have created <a href="http://www.d3geometry.com/functions" rel="nofollow">this</a> functionality using d3.js and mathjs that draws a curve and then draws the tangent of the curve on mouseover.  The source code is <a href="https://github.com/dagda1/d3-geometry/blob/master/app/js/components/function-plot.js" rel="nofollow">here</a>.</p>
  
  <p>What I am interested in doing is allowing the user to scroll a cubic curve for example by dragging the x axis and then redrawing the graph.</p>
  
  <p>Can anyone give me some high level guidance on how to achieve this?</p>