Created
March 9, 2012 22:22
-
-
Save ashaw/2009032 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 sankeyIze = function(ox, oy, dx, dy) { | |
var curve = ((dx-ox) * 0.25) | |
var path = ""; | |
path += "M "+ ox + "," + oy; | |
path += "Q " + (ox+curve) + "," + oy + " " + ((ox+dx)/2) +","+ ((oy+dy)/2); | |
path += "Q " + (dx-curve) + "," + dy + " " + dx + "," + dy; | |
return path; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment