DmitryBaranovskiy / g.raphael

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

glow() on piechart results piechart set instead of glow set #161

Open valioDOTch opened 12 years ago

valioDOTch commented 12 years ago

Seems as if a glow() command on a pie returns the pie itself, instead of the glow set.

var r = Raphael(10, 10, 640, 480);

var circle=r.circle(40,40,25);
circle.attr({fill:"red"});
circle.hover(circle_in,circle_out)
var cglow=null;

function circle_in(){
    if (cglow==null){
        cglow=circle.glow(); 
    }
}

function circle_out(){
    if (cglow!=null){
        cglow.remove();
        cglow=null; 
    }
}

var pie = r.piechart(150, 150, 50, [30, 20, 30, 20]);
pie.hover(pie_in,pie_out);
var pglow=null;

function pie_in(){
    if (pglow==null){
        pglow=pie.glow(); 
    }
}

function pie_out(){
    if (pglow!=null){
        pglow.remove(); 
        pglow=null;
    }
}

Thus it seems to apply not feasible to apply glow on piecharts at the moment.

valioDOTch commented 12 years ago

or see it on http://jsfiddle.net/W4ZUv/