User:Themsen/Protclass7: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 1: Line 1:
words.html
words.html


<code>
<code=html>
<meta charset="utf-8" />
<meta charset="utf-8" />
<script src="d3.min.js"></script>
<script src="d3.min.js"></script>

Revision as of 19:18, 28 April 2015

words.html

<code=html> <meta charset="utf-8" /> <script src="d3.min.js"></script> <body>

</body> <script>

d3.json("words2.json", function (data) { console.log("loaded", data); d3.select("#content") .selectAll("span") .data(data) .enter() .append("span") .text(function(d) { return d.word + " " }) .style("font-size", function(d) { return d.count })

})

</script>