-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcdv3.html
52 lines (31 loc) · 794 Bytes
/
cdv3.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<style>
</style>
</head>
<body>
<script type="text/javascript">
var dataset;
d3.csv( "http://projects.kraeutli.com/cdv/data.php", function( data ) {
dataset = data;
make();
} );
function make() {
var svg = d3.select( "body" ).append( "svg" )
.attr( "width", 800 )
.attr( "height", 600 );
var works = svg.append( "g" )
.attr( "id", "works" );
works.selectAll( "g.work" ).data( dataset )
.enter()
.append( "g" )
.attr( "class", "work" )
.append( "circle" )
.attr( "r", 5 );
}
</script>
</body>
</html>