我想顯示一個動畫的餅圖,使它從一個「小點」增長到全尺寸的餅圖,像這樣的growing pie或Highcharts Demo Gallery - Pie,但我想要應用它與gRaphael做了一個餅,gRaphael餅圖:添加動畫
這裏是我的jsfiddle例如...提前raphael pie chart with legend
感謝,
我想顯示一個動畫的餅圖,使它從一個「小點」增長到全尺寸的餅圖,像這樣的growing pie或Highcharts Demo Gallery - Pie,但我想要應用它與gRaphael做了一個餅,gRaphael餅圖:添加動畫
這裏是我的jsfiddle例如...提前raphael pie chart with legend
感謝,
爲了達到那樣的動畫,你必須訪問的部門和......它們的動畫:)
你可以做到這一點使用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/
玩得開心;)
謝謝,這就是我一直在尋找的! – Daniel
非常好。你有gRaphael的API參考嗎?官方網站沒有提供文檔.. –
沒有API參考,除了https://github.com/DmitryBaranovskiy/g.raphael –
計算器是不是 「給我的codez」 還挺網站。 [你嘗試過什麼](http://mattgemmell.com/2008/12/08/what-have-you-tried/)? –
是的,我確實....... – Daniel
所以請在問題中說明。沒有顯示一些研究工作,你不可能得到有用的答案。 –