开发者

How can I add click event to my Raphael pie chart?

How can I add click event to my Raphael pie chart ?

var r = Raphael("holder-1",340, 185); 
pie = r.g.piechart(150,85, 75, values , {legend: labels, legendpos: "east"});

I got the answer it is:

pie.click(function () {     })开发者_如何学运维;

Can I pass value to the onclick event? Here can I pass values and labels to onclick` function?


According to the docs for the node attribute, you should just be able to attach events as you would any DOM element using it:

pie.node.onclick = function () { /* Something */ };
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜