Pie Chart

First step in g.Raphaël. :)

Here is the code:

Raphael("piechart", 400, 300).g.piechart(150, 150, 100, [4, 4, 2, 1, 1, 1]).stroke("#fff").legend(["%%.% JS", "%%.% HTML", "%%.% CSS", "%%.% VM", "%%.% JAVA", "%%.% VMD"]).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);

if (this.label) {

this.label[0].animate({scale: 1}, 500);

this.label[1].attr({"font-weight": 400});

}

});

7,802 views
2 faves
5 comments
Uploaded on June 19, 2009
Taken on June 18, 2009