easy-pie-chart icon indicating copy to clipboard operation
easy-pie-chart copied to clipboard

Starting animation click

Open Messa1 opened this issue 10 years ago • 2 comments

Is it possible to start the animation with a click event? For example if i click on a div with the class="startbutton" Like in this example:

$( ".startbutton" ).click(function() {
   $('.chart').data('easyPieChart').startAnimation();
});

Is it possible to set something like "startAnimation();"

Messa1 avatar Mar 19 '14 10:03 Messa1

Oky i use this for getting started at click. But a restart would be nice. :+1:

$(".startbutton").click(function() {
        $('.chart').easyPieChart({
    //Here comes the Options
        });
    });

Messa1 avatar Mar 19 '14 10:03 Messa1

You can set the initial percent value to 0 or leave it blank. Then you can trigger the animation with the update method. Pass the value to it to which you want the chart to be updated.

rendro avatar Mar 19 '14 21:03 rendro