<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>D3JS</title>
<script src="https://d3js.org/d3.v4.min.js" type="text/javascript"></script>
</head>
<body>
<p>D3 Tutorials</p>
<script>
//array
var myData = [1, 2, 3, 4, 5];
var p = d3.select("body")
.selectAll("p")
.data(myData)
.text(function (d, i) {
return d;
});
</script>
</body>
</html>
//Output will be
1
No comments:
Post a Comment