Parametric graphs in d3.js