Skip to content

Instantly share code, notes, and snippets.

@bishopandco
Created December 5, 2012 01:48
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 bishopandco/4211312 to your computer and use it in GitHub Desktop.
Save bishopandco/4211312 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<!--[if lte IE 8]>
<script type="text/javascript" src="http://webmonarch.github.com/d34raphael/d3/lib/sizzle/sizzle.js"></script>
<script type="text/javascript" src="http://webmonarch.github.com/d34raphael/d3/lib/ie8/compat.js"></script>
<![endif]-->
<script type="text/javascript" src="http://webmonarch.github.com/d34raphael/d3/lib/raphael/raphael.js"></script>
<script type="text/javascript" src="http://webmonarch.github.com/d34raphael/d3/d3.v2.js"></script>
<script>
var paper = new Raphael(document.body, 400, 300);
var d3_paper = d3.raphael(paper);
var svg = d3_paper.select("body").append("svg")
.attr("viewBox", "0 0 500 300");
svg.append("defs").append("path")
.attr("id", "s3")
.attr("d", "M 10,90 Q 100,15 200,70 Q 340,140 400,30");
var thing = svg.append("g")
.attr("id", "thing");
//.style("fill", "navy");
thing.append("text")
//.style("font-size", "20px")
.append("textPath")
.attr("xlink:href", "#s3")
.text("Wavy text is the gimmick for many years to come (d3)");
thing.append("use")
.attr("xlink:href", "#s3");
//.style("stroke", "black")
//.style("fill", "none");
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment