05/09/2015

[D3.js]First Class from youyube learning

D3 =  Data-Driven Documents

<!doctype html>
<html>

<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
</head>

<body>
<p> this is a paragraph</p>

<script>
d3.select("body")
.append("p")
.style("color","red")
.text("Hi");


   console.log(d3)
</script>

</body>
</html>

## using notepad++

SVG shapes
var canvas = d3.select("body")
.append("svg")
.attr("width",500)
.attr("height",500);

var circle = canvas.append("circle")
.attr("cx",250)
.attr("cy",250)
.attr("r",250)
.attr("fill","red")