Created
June 26, 2012 06:09
-
-
Save roundrobin/2993687 to your computer and use it in GitHub Desktop.
just another inlet to tributary
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var type = ["linear", "step-before", | |
"step-after", "basis", | |
"basis-open", "basis-closed", | |
"bundle", "cardinal", | |
"cardinal-open", "cardinal-closed", | |
"monotone"]; | |
var line = d3.svg.line() | |
.x(function(d) { return d.x; }) | |
.y(function(d) { return d.y; }) | |
.interpolate('cardinal'); | |
var data1 = [{x:1,y:20}, | |
{x:264,y:265}, | |
{x:56,y:265}, | |
{x:19,y:136}, | |
{x:12,y:100} | |
]; | |
g.selectAll("path") | |
.data([0, 0.2, 0.4, 0.6, 0.8, 1]) | |
.enter().append("svg:path") | |
.attr("d", function(d) { return line.tension(d)(data1); }) | |
.attr('stroke',"#1949C5") | |
.attr('stroke-width',2); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment