在使用的时候本来想在获取数据的时候,再放入percent值,但死活不出来进度条条了,只能无奈设置默认100.求教有木正确方式?
$("#demo-pie-1").attr("data-percent",Math.round(signRate));$(‘#demo-pie-1‘).easyPieChart({ barColor :‘#68b828‘, scaleColor: false, trackColor : ‘#eee‘, lineCap : ‘round‘,//‘butt‘, lineWidth :8, onStep: function(from, to, percent) { $(this.el).find(‘.pie-value‘).text(Math.round(signRate) + ‘%‘); } });
<div id="demo-pie-1" class="pie-title-center mar-rgt" data-percent="100"> <span class="pie-value text-thin"></span> </div>
时间: 2024-10-13 23:29:54