Skip to content

Commit

Permalink
Add .font to simple example.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasondavies committed Nov 10, 2012
1 parent 7fbd81e commit e3db3c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
return {text: d, size: 10 + Math.random() * 90};
}))
.rotate(function() { return ~~(Math.random() * 2) * 90; })
.font("Impact")
.fontSize(function(d) { return d.size; })
.on("end", draw)
.start();
Expand All @@ -23,6 +24,7 @@
.data(words)
.enter().append("text")
.style("font-size", function(d) { return d.size + "px"; })
.style("font-family", "Impact")
.attr("text-anchor", "middle")
.attr("transform", function(d) {
return "translate(" + [d.x, d.y] + ")rotate(" + d.rotate + ")";
Expand Down

0 comments on commit e3db3c9

Please sign in to comment.