Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (23 sloc) 973 Bytes
<html>
<head>
<title>gRaphaël Pie Chart - a simple piechart example</title>
<script type="text/javascript" src="../raphael-min.js"></script>
<script type="text/javascript" src="../../g.raphael.js"></script>
<script type="text/javascript" src="../../g.pie.js"></script>
<script type="text/javascript">
window.onload = function() {
// Creates canvas 640 × 480 at 10, 50
var r = Raphael(10, 50, 640, 480);
// Creates pie chart at with center at 320, 200,
// radius 100 and data: [55, 20, 13, 32, 5, 1, 2]
var pie = r.piechart(320, 240, 100, [55, 20, 13, 32, 5, 1, 2]);
// add a click event to the pie chart
pie.click(function() {
alert("You clicked on the pie chart!");
});
}
</script>
</head>
<body>
</body>
</html>