我使用g.Raphael制作了一张图表:
$(function(){
var r = Raphael("pieChart"),
pie = r.piechart(320, 240, 100, [55, 20, 13, 32, 5, 1, 2, 10]);
r.text(320, 100, "Interactive Pie Chart").attr({ font: "20px sans-serif" });
$(pie.sector).click(function(){
alert('hi');//not work!
})
})
后来我在 pie.sector 上添加了 click 事件,但我的事件不起作用...有人知道如何正确使用 jQuery 处理 gRaphael 吗?