我希望显示带有动画的饼图,使其从“小点”增长到全尺寸饼图,类似于growing pie或此Highcharts Demo Gallery - Pie,但我想要将它应用于用gRaphael制作的馅饼,
这是我的jsfiddle示例...... raphael pie chart with legend
非常感谢,
答案 0 :(得分:7)
为了实现这种动画,你必须访问扇区并为它们制作动画:)
您可以使用your_pie.each()
执行此操作pie.each(function(){
//scale each sector to 0
this.sector.scale(0, 0, this.cx, this.cy);
//animate from 0 to default size
this.sector.animate({ transform: 's1 1 ' + this.cx + ' ' + this.cy }, 1000, "bounce");
});
小提琴在这里:http://jsfiddle.net/85VtZ/6/
玩得开心;)