DmitryBaranovskiy / g.raphael

Charts for Raphaël
http://g.raphaeljs.com/
1.51k stars 436 forks source link

g.raphael port to make it compatible with raphael2.0 #124

Closed karolk closed 13 years ago

karolk commented 13 years ago

I ported all g.raphael libraries. One important change in the API is you will have to call g, for example

var r = Raphael(elem, 100, 100) var graph = r.g().dotchart(/* params */)

Going forward I would evolve the charts APIs to have an alternative way of being called straight on raphael (like colopicker plugin).

I made all demos work, mostly by fixing this context and adjusting old way of scaling and rotating to the new transform API.

karolk commented 13 years ago

Obviously the rationale to make g.raphael work with callable g is to make porting existing code really easy. Apart from some things like animating scale, which has to be done with transform, adjusting old code only requires adding brackets after g.