25 строки
553 B
HTML
25 строки
553 B
HTML
<html>
|
|
<head>
|
|
<title>Hello, node!</title>
|
|
<script type="text/javascript" src="../../d3.js"></script>
|
|
</head>
|
|
<body>
|
|
Your lucky numbers are:<br>
|
|
<span value="42"></span>
|
|
<span value="4"></span>
|
|
<span value="8"></span>
|
|
<span value="15"></span>
|
|
<span value="16"></span>
|
|
<span value="23"></span>
|
|
<script type="text/javascript">
|
|
|
|
var data = [4, 8, 15, 16, 23, 42];
|
|
|
|
d3.selectAll("span")
|
|
.data(data, function(d) { return d || this.getAttribute("value"); })
|
|
.text(String);
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|