一款新型HTML5效果的EASY饼图数据统计Jquery插件
效果如下:
<script> <br />
var initPieChart = function() { <br />
$('.percentage').easyPieChart({ <br />
animate: 1000 <br />
}); <br />
$('.percentage-light').easyPieChart({ <br />
barColor: function(percent) { <br />
percent /= 100; <br />
return "rgb(" + Math.round(255 * (1-percent)) + ", " + <br />
Math.round(255 * percent) + ", 0)"; <br />
}, <br />
trackColor: '#666', <br />
scaleColor: false, <br />
lineCap: 'butt', <br />
lineWidth: 15, <br />
animate: 1000 <br />
}); <br />
<br />
$('.updateEasyPieChart').on('click', function(e) { <br />
e.preventDefault(); <br />
$('.percentage, .percentage-light').each(function() { <br />
var newValue = Math.round(100*Math.random()); <br />
$(this).data('easyPieChart').update(newValue); <br />
$('span', this).text(newValue); <br />
}); <br />
}); <br />
}; <br />
</script>
附件下载地址: http://www.jb100.net/down-44-18.html
AD:真正免费,域名+虚机+企业邮箱=0元