Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force update to start always from 0 to Value not working: Random 0 value obtained #209

Open
djkad opened this issue Jun 16, 2020 · 0 comments

Comments

@djkad
Copy link

djkad commented Jun 16, 2020

// I don't know why, but sometimes it work, sometimes it show 0
// This code is executed by a onclick event, after obtained the "voto" value from an ajax call
if ($('#element').data('easyPieChart')!==undefined) {
$('#element').data('easyPieChart').update(0);
$('#element').data('easyPieChart').update(voto);
} else {
$('#element').easyPieChart({
barColor:"#EC7205",
trackColor:"#F5F5F5",
scaleColor:"#FFF",
lineCap:"round",
lineWidth:8,
size:150,
onStep: function(from, to, percent) {
$('.easypie-data').html(Math.round(percent));
}
});
$('#element').data('easyPieChart').update(voto);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant