-
Notifications
You must be signed in to change notification settings - Fork 1
/
piechart.html
48 lines (43 loc) · 2.22 KB
/
piechart.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
<html lang="en">
<head>
<title>çizerlerr :)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="author" content="Asim Turgut">
<meta name="description" content="grafik çizimleri">
<script type="text/javascript" src="js/raphael.js"> charset="utf-8"</script>
<script type="text/javascript" src="js/g.raphael.js"> charset="utf-8"</script>
<script type="text/javascript" src="js/g.pie.js"> charset="utf-8"</script>
<script type="text/javascript" src="js/g.bar.js"> charset="utf-8"</script>
<script type="text/javascript" src="js/g.line.js"> charset="utf-8"</script>
<script type="text/javascript" src="js/g.dot.js"> charset="utf-8"</script>
<script type="text/javascript" charset="utf-8">
window.onload = function () {
var r = Raphael("holder");
r.g.txtattr.font = "12px 'Fontin Sans', Fontin-Sans, sans-serif";
r.g.text(320, 100, "2011 Yerel Seçim Sonuçları").attr({"font-size": 20});
var pie = r.g.piechart(350, 240, 100, [49.9, 26.9, 12.9, 11.3], {legend: ["%%.%% AKP", "%%.%% CHP","%%.%% MHP","%%.%% DİĞER"], legendpos: "west", href: ["http://ktuluceng.com", "http://ktuluceng.com","http://ktuluceng.com","http://ktuluceng.com"]});
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].scale(1.5);
this.label[1].attr({"font-weight": 800});
}
}, function () {
this.sector.animate({scale: [1, 1, this.cx, this.cy]}, 500, "bounce");
if (this.label) {
this.label[0].animate({scale: 1}, 500, "bounce");
this.label[1].attr({"font-weight": 400});
}
});
};
</script>
</head>
<body >
<div id="holder"></div>
<p>
Sonuçların pie chart'a dökülü hali yukardaki gibidir.
</p>
</body>
</html>