Skip to content

Instantly share code, notes, and snippets.

@roundrobin
Created June 26, 2012 05:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roundrobin/2993550 to your computer and use it in GitHub Desktop.
Save roundrobin/2993550 to your computer and use it in GitHub Desktop.
just another inlet to tributary
var line = d3.svg.line()
.x(function(d) { return d.x; })
.y(function(d) { return d.y; })
.interpolate("basis-closed");
var data1 = [{x:1,y:20},
{x:32,y:265},
{x:100,y:100},
{x:281,y:60},
{x:500,y:160}];
g.selectAll("path")
.data(data1)
.enter().append("svg:path")
.attr("d", function(d) { return line.tension(d)(data1); })
.attr('stroke','#ff00ff')
.attr('stroke-width',2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment