-
Notifications
You must be signed in to change notification settings - Fork 307
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
Update percentage and circle #6
Comments
+1 |
1 similar comment
+1 |
+1 |
I know this isn't the answer but I would like to offer a workaround for other developers that come across this page. [html] [javascript] |
My solution maybe not qualified but it's work for me. I'm using this with jquery downcount plugin for under construction page (http://www.dijicat.com) function update(area, percent) {
}; |
$('#stat').empty().removeData().attr('data-percent', '[new-percent]').circliful() |
Can i now update circle without redrawing them so if i have 14% and i want only update text in them to example 16% and draw a little circle not at begin? |
Thanks so much sQu1rr! |
Thanks so much, it helps a lot. 👍 |
Works for me! Thanks a lot! |
For anyone interested, I found a way to make the percentage text work as an updating counter. This will add up the displayed number along with the animating bar. JS You'll have to position the |
@paddotk You can just do $('#your-circle').find('.circle-text').html(updatePerc + '%'); No css positioning needed |
@kylescousin This does exactly the same... Assuming the ' |
Here is my solutionfunction draw(idwhere,idwhat,options){
$("#"+idwhat).remove();
$("#"+idwhere).append('<div id="'+idwhat+'"></div>');
$.each(options, function(i, val){
$("#"+idwhat).attr('data-'+i, val)
});
$("#"+idwhat).circliful();
} A little example of using...
draw('myStatContianer','myStat',{
percent:'99',
text:'99%',
dimension: "70",
width: "10",
fontsize: "17",
fgcolor: "#319db5",
bgcolor: "#e3f5ff"
})
... And if you dont want to redraw circles there is an extended circliful lib |
sQu1rr ... worked great. Wasted several hours trying to do this myself until I found your solution. THANK YOU! |
Hi is there a simple way to make the circle update ? |
To change the foreground circle degree I used the following method:
where degree is the between 0 and 360. So you only update the outer circle degree without recreating the circle object. |
Circliful has a bug in updating percentages. See pguso/js-plugin-circliful#6
@gesaleh Same here, my solution is a combination of answers above:
|
with the new implementation you can call the update function to set the percentage circle.update({type: 'percent', value: 50}); |
Is there a way to update the percentage and the circle without re doing the circle?
I just want to update the circle every time the user performs certain action.
Thank you.
The text was updated successfully, but these errors were encountered: