Skip to content

Instantly share code, notes, and snippets.

@jcdcodes
Last active February 6, 2016 17:02
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 jcdcodes/198a7772747d400706df to your computer and use it in GitHub Desktop.
Save jcdcodes/198a7772747d400706df to your computer and use it in GitHub Desktop.
Hello world
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Gill Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
width: 960px;
height: 500px;
position: relative;
}
</style>
<body>
Accreting some numbers:
<script src="//d3js.org/d3.v3.min.js"></script>
<script>
d3.select("body").selectAll("p")
.data([1,1,2,3,5,8,13,21,34,55])
.enter().append("p")
.text(function(d) { return "Number "+d+"."; });
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment