-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchartRugby.html
41 lines (41 loc) · 1018 Bytes
/
chartRugby.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
<!DOCTYPE html>
<meta charset="utf-8">
<script src="lib/d3.v3.min.js"></script>
<script src="lib/jquery-1.8.3.min.js"></script>
<script src="code/rugbychart.js"></script>
<style type="text/css">
.line {
fill: none;
stroke: #000000;
stroke-width: 1.5px;
}
.area {
fill: #969696;
}
.attention {
background: none repeat scroll 0 0 yellow;
margin: -4px;
padding: 4px;
}
</style>
<a id="all" href="#">all</a> <a id="team" href="#">team</a> <a id="fb" href="#">Forwards/Backs</a>
<p id="example">
<script>
$(document).ready(function () {
var myChart = rugbyChart();
d3.csv("rugby2.csv", function (data) {
d3.select("#example")
.datum(data)
.call(myChart);
});
$("#all").click(function(){
myChart.group("all");
});
$("#team").click(function(){
myChart.group("team");
});
$("#fb").click(function(){
myChart.group("fb");
});
});
</script>