通过定义一个canvas标签, new方法传进ID值,和旋转角度值,即可生成圆形进度条
圆进度条 window.chart =function(ID){ document.getElementById(ID); ); canvas.width; canvas.height; ; ; ; ; console.log(R); console.log(outW); console.log(outR); $ (number){ degrees ctx.beginPath(); ctx.strokeStyle ; outW; ctx.arc(W ); ctx.stroke(); ; ctx.beginPath(); ctx.strokeStyle ; ctx.lineWidth = outW; ); ctx.stroke(); ; ctx.shadowColor ; ctx.font ; text ; text_w = ctx.measureText(text).width; ctx.fillText(text, W ); }; $(number){ ; (){ number){ clearInterval(time); }else{ number ; } $this.ratePieNoAnimation(i); ){ $this.ratePieNoAnimation(number); clearInterval(time); } }, number)); }; } );