source: Dev/trunk/d3/examples/hello-world/hello-node-key.html @ 76

Last change on this file since 76 was 76, checked in by fpvanagthoven, 14 years ago

d3

File size: 569 bytes
Line 
1<!DOCTYPE html>
2<html>
3  <head>
4    <title>Hello, node!</title>
5    <script type="text/javascript" src="../../d3.js"></script>
6  </head>
7  <body>
8    Your lucky numbers are:<br>
9    <span value="42"></span>
10    <span value="4"></span>
11    <span value="8"></span>
12    <span value="15"></span>
13    <span value="16"></span>
14    <span value="23"></span>
15    <script type="text/javascript">
16
17var data = [4, 8, 15, 16, 23, 42];
18
19d3.selectAll("span")
20    .data(data, function(d) { return d || this.getAttribute("value"); })
21    .text(String);
22
23    </script>
24  </body>
25</html>
Note: See TracBrowser for help on using the repository browser.