Skip to content

Instantly share code, notes, and snippets.

@arubyist
Created June 20, 2014 21:13
Show Gist options
  • Select an option

  • Save arubyist/980e739ee84ce5f8926f to your computer and use it in GitHub Desktop.

Select an option

Save arubyist/980e739ee84ce5f8926f to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>My project</title>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
</head>
<body>
<p>Fa</p>
<p>La</p>
<p>La</p>
<p>La</p>
<script>
var fs=["10px", "20px", "30px"];
var colors = ["darkmagneta", "teal", "rosybrown", "midnightblue"];
d3.selectAll("p").data(fs).style("font-size", function(d) {return d;});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment