特效介绍
此插件主要是用来统计新的访问、跳出率、服务器负载、使用的RAM等,功能很强大,带有HTML5的动画效果,效果非常炫,看效果吧easyPieChart一款新型的EASY饼图数据统计Jquery插件截图:
使用方法
1导入需要文件
1 | < script type = "text/javascript" src = "jquery-1.11.2.min.js" ></ script > |
2 | < script type = "text/javascript" src = "html5.js" ></ script > |
3 | < script type = "text/javascript" src = "excanvas.js" ></ script > |
4 | < script type = "text/javascript" src = "jquery.easy-pie-chart.js" ></ script > |
5 | < link rel = "stylesheet" type = "text/css" href = "jquery.easy-pie-chart.css" media = "screen" > |
2js创建chart
01 | var initPieChart = function () { |
02 | $( '.percentage' ).easyPieChart({ |
05 | $( '.percentage-light' ).easyPieChart({ |
06 | barColor: function (percent) { |
08 | return "rgb(" + Math.round(255 * (1-percent)) + ", " + Math.round(255 * percent) + ", 0)" ; |
17 | $( '.updateEasyPieChart' ).on( 'click' , function (e) { |
19 | $( '.percentage, .percentage-light' ).each( function () { |
20 | var newValue = Math.round(100*Math.random()); |
21 | $( this ).data( 'easyPieChart' ).update(newValue); |
22 | $( 'span' , this ).text(newValue); |
3.html
01 | < div class = "container" > |
04 | < div class = "percentage" data-percent = "55" >< span >55</ span >%</ div > |
05 | < div class = "label" >新的访问</ div > |
08 | < div class = "percentage" data-percent = "46" >< span >46</ span >%</ div > |
09 | < div class = "label" >跳出率</ div > |
12 | < div class = "percentage" data-percent = "92" >< span >92</ span >%</ div > |
13 | < div class = "label" >服务器负载</ div > |
16 | < div class = "percentage" data-percent = "84" >< span >752</ span >MB</ div > |
17 | < div class = "label" >使用的RAM</ div > |
19 | < div style = "clear:both;" ></ div > |
22 | < div class = "percentage-light" data-percent = "55" >< span >55</ span >%</ div > |
23 | < div class = "label" >新的访问</ div > |
26 | < div class = "percentage-light" data-percent = "46" >< span >46</ span >%</ div > |
27 | < div class = "label" >跳出率</ div > |
30 | < div class = "percentage-light" data-percent = "92" >< span >92</ span >%</ div > |
31 | < div class = "label" >服务器负载</ div > |
34 | < div class = "percentage-light" data-percent = "84" >< span >752</ span >MB</ div > |
35 | < div class = "label" >使用的RAM</ div > |
37 | < div style = "clear:both;" ></ div > |
39 | < p >< a href = "#" class = "button updateEasyPieChart" >更新饼图</ a ></ p > |
部分素材资源来源网站,本站提供免费下载,如有侵权请联系站长马上删除!