This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Creates canvas 640 × 480 at 10, 50 | |
var r = Raphael(10, 50, 640, 480); //OR | |
var r=Raphael(“holder”); //holder is name of div |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var chart=r.g.barchart(x, y, width, height, values, opts); | |
//opts stands for options such as: type (round, square, soft, sharp), stacked (true, false), gutter etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
y=[1,5,23,4,5,8,9,14,24,36,31,2,22,24,24,15,4,4,8,12]; | |
fin = function () { | |
this.flag = r.g.popup(this.bar.x, this.bar.y, this.bar.value || "0").insertBefore(this); | |
}, | |
fout = function () { | |
this.flag.animate({opacity: 0}, 300, function () { | |
this.remove(); | |
}); |