Created
July 25, 2015 13:42
-
-
Save nachomezzadra/afc3acb2a5cb527d8078 to your computer and use it in GitHub Desktop.
This file contains hidden or 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> | |
<html> | |
<head> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<meta charset="utf-8"> | |
<title>Diplomatura Big Data - ITBA</title> | |
<style id="jsbin-css"> | |
.chart div { | |
font: 10px sans-serif; | |
background-color: steelblue; | |
text-align: right; | |
padding: 3px; | |
margin: 1px; | |
color: white; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="d3" class="chart"> | |
</div> | |
<script> | |
</script> | |
<script id="jsbin-javascript"> | |
var v = [4, 8, 15, 16, 23, 42]; | |
d3.select("div#d3").selectAll("p").data(v).enter().append("div") | |
.text(function(data, index) { return data; }) | |
.attr("style", function(data, index) { return "width: " +data*10+"px;";} | |
); | |
</script> | |
<script id="jsbin-source-css" type="text/css">.chart div { | |
font: 10px sans-serif; | |
background-color: steelblue; | |
text-align: right; | |
padding: 3px; | |
margin: 1px; | |
color: white; | |
}</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var v = [4, 8, 15, 16, 23, 42]; | |
d3.select("div#d3").selectAll("p").data(v).enter().append("div") | |
.text(function(data, index) { return data; }) | |
.attr("style", function(data, index) { return "width: " +data*10+"px;";} | |
);</script></body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment