rendro / easy-pie-chart

easy pie chart is a lightweight plugin to draw simple, animated pie charts for single values
http://rendro.github.io/easy-pie-chart
MIT License
2.07k stars 501 forks source link

scaleLength does not work. #199

Open wharter1980 opened 6 years ago

wharter1980 commented 6 years ago

I have tried both variations below.

this one I can change the barColor but scaleLength will not update:

        $('#pendingChart').data('easyPieChart').update(50);
        $('#pendingChart').data('easyPieChart').options['scaleLength'] = 2;

(which I cannot get animate to work either)

and this way it does not work either:

var $chart = $(".easy-pie-chart");
$chart.data('easyPieChart', null);
$chart.easyPieChart({
    easing: 'easeOutCirc',
    barColor: '#a57225',
    trackColor: '#f9f9f9',
    scaleColor: false,
    percent: 10,
    scaleLength: 5,
    lineCap: 'butt',
    lineWidth: 5,
    size: 50,
    animate: { duration: 2000, enabled: true },
    onStep: function (from, to, percent) {
        $(this.el).find('.percent').text(Math.round(percent));
    }
});
MarioPerini commented 5 years ago

https://codepen.io/MarioPerini/pen/LaGrdR