Skip to content

Instantly share code, notes, and snippets.

@wd15
Last active February 23, 2016 16:05
Show Gist options
  • Select an option

  • Save wd15/e24ae41d07d5354bd8d7 to your computer and use it in GitHub Desktop.

Select an option

Save wd15/e24ae41d07d5354bd8d7 to your computer and use it in GitHub Desktop.
Trivial D3 example using coffeescript - see https://rawgit.com/wd15/e24ae41d07d5354bd8d7/raw/
theData = [ 1, 2, 3 ]
d3.select("body").selectAll("p")
.data(theData)
.enter()
.append("p")
.text((d) -> d)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Trivial example</title>
<script src="//cdn.jsdelivr.net/g/d3js,coffeescript"></script>
<script type="text/coffeescript" src="d3test.coffee"></script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment