一款新型HTML5效果的EASY饼图数据统计Jquery插件

浏览:3405 发布日期:2015/01/22 分类:功能实现 关键字: 一款新型HTML5效果的EASY饼图数据统计Jquery插件
一款新型HTML5效果的EASY饼图数据统计Jquery插件
效果如下:
        <script type="text/javascript"> 
              var initPieChart = function() { 
                  $('.percentage').easyPieChart({ 
                      animate: 1000 
                  }); 
                  $('.percentage-light').easyPieChart({ 
                      barColor: function(percent) { 
                          percent /= 100; 
                          return "rgb(" + Math.round(255 * (1-percent)) + ", " + 
                     Math.round(255 * percent) + ", 0)"; 
                      }, 
                      trackColor: '#666', 
                      scaleColor: false, 
                      lineCap: 'butt', 
                      lineWidth: 15, 
                      animate: 1000 
                  }); 
         
                  $('.updateEasyPieChart').on('click', function(e) { 
                    e.preventDefault(); 
                    $('.percentage, .percentage-light').each(function() { 
                      var newValue = Math.round(100*Math.random()); 
                      $(this).data('easyPieChart').update(newValue); 
                      $('span', this).text(newValue); 
                    }); 
                  }); 
              }; 
          </script> 
附件下载地址: http://www.jb100.net/down-44-18.html
评论( 相关
后面还有条评论,点击查看>>