Open klaut opened 12 years ago
I'd love to know how to do this too.
you don't need to modify the library. just define a render function in your code that calls itself using setTimeout
with some small enough the refresh interval (e.g. every 100ms) until the progress is done? and in the render function call $('.knob').val(current_value).trigger('change')
where current_value represents the progress and knob
is the class of your knob element; it should update as expected
If anyone else is just looking for an animated Doughnut-style chart, you might find this useful: https://github.com/mtibben/jquery.donutchart/blob/master/jquery.donutchart.js
This is the best solution I have found so far, works perfectly and the value is dynamic too
http://stackoverflow.com/questions/16416379/jquery-knob-animate
Hi!
I am trying to modify the code, so i could use the knob as a circular progress bar. I am struggling a bit with animating the drawing of the arc. Do you have any tips how would I go about it? Should I use the draw hook for that and use setInterval inside that?