2021
02-21
02-21
JavaScript 绘制饼图的示例
绘制效果实现代码JavaScriptvarcanvas=document.getElementById("mycanvas");varw=window.innerWidth;varh=window.innerHeight;canvas.height=1000;canvas.width=1400;varctx=canvas.getContext('2d');varpoppable=true;varslices=[];functionshadeColor(color,percent){varf=parseInt(color.slice(1),16),t=percent<0?0:255,p=percent<0?percent*-1:percent,R=f...
继续阅读 >