-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
43 lines (43 loc) · 1.88 KB
/
Copy pathtest.html
File metadata and controls
43 lines (43 loc) · 1.88 KB
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
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Anne and Bailey Information Visualization Final Project</title>
<meta name="description" content="A review of informal survey data on the use of technology and public radio.">
<link rel="stylesheet" href="css/style.css">
<script src="js/libs/modernizr-2.5.3.min.js"></script>
<script src="js/libs/jquery-1.7.1.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/libs/raphael-min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/libs/g.raphael-min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/libs/g.pie-min.js" type="text/javascript" charset="utf-8"></script>
<script>
window.onload = function () {
var r = Raphael("popshows"),
pie = r.piechart(320, 240, 100, [17,11,14,30,16,9]
, { legend: ["All Things Considered %%","NPR Fresh Air %%","Radiolab %%","This American Life %%","Wait Wait Don't Tell Me %%","Car Talk %%"], legendpos: "west", href: ["http://raphaeljs.com", "http://g.raphaeljs.com"], colors: ["#FF8357", "#82220B", "#363942", "#D8CAA8", "#F5E9AE", "#209193"]}).attr({"stroke-width":3});
// pie.attr({"stroke-width":10});
r.text(320, 100, "Most Popular Public Radio Programs").attr({ font: "20px sans-serif" });
pie.hover(function () {
this.sector.stop();
this.sector.scale(1.1, 1.1, this.cx, this.cy);
if (this.label) {
this.label[0].stop();
this.label[0].attr({ r: 7.5 });
this.label[1].attr({ "font-weight": 800 });
}
}, function () {
this.sector.animate({ transform: 's1 1 ' + this.cx + ' ' + this.cy }, 500, "bounce");
if (this.label) {
this.label[0].animate({ r: 5 }, 500, "bounce");
this.label[1].attr({ "font-weight": 400 });
}
});
};
</script>
</head>
<body>
<div id="popshows">
</div>
<div id="commute">
</div>
</body>
</html>