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 */ };
精彩评论