A simple template for blocks gists. Replace the code, drop a new 230x120 png, and of course update this README. After updating, look for the result on the blocks account page.
Created
December 18, 2012 08:18
-
-
Save dribnet/4326085 to your computer and use it in GitHub Desktop.
d3 http://bl.ocks.org/ template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
/* css goes here */ | |
body { | |
font: 40px sans-serif; | |
} | |
div#target { | |
text-align: center; | |
background-color: lightblue; | |
} | |
</style> | |
<body> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<div id="target"> | |
<!-- d3 goodness here --> | |
</div> | |
<script> | |
/* d3.js code goes here */ | |
d3.select("#target") | |
.style("width", "230px") | |
.style("height", "120px") | |
.selectAll("div") | |
.data(["hello", "world"]) | |
.enter().append("div") | |
.text(function(d) { return d; }); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment