progressbar.js
progressbar.js copied to clipboard
Cant have an empty progress bar
I want to use the progress bar to indicate how close a user is to advance to the next level. So far I tried to set .animate to zero, or remove it completely, but either way, it doesn't work. It shows an empty bar but will not show the number within the circle.
Could you please isolate the issue to a JSFiddle: http://jsfiddle.net/kimmobrunfeldt/8xa87k31/392/ ? To see what your existing code is and potentially there we can fix it. I can't guarantee when I'd have the next time to look into it though.
@NathanHennigh This problem also exists in my project. Is your problem solved?
No, I think I abandoned it all together after a while. It was a while ago
On Mon, Mar 4, 2019, 9:45 PM 苏日俪格 [email protected] wrote:
I want to use the progress bar to indicate how close a user is to advance to the next level. So far I tried to set .animate to zero, or remove it completely, but either way, it doesn't work. It shows an empty bar but will not show the number within the circle.
This problem also exists in my project. Is your problem solved?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kimmobrunfeldt/progressbar.js/issues/213#issuecomment-469547120, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ3xQprPtM1cdsm1rwJMooFYf5bZuX9eks5vTgSNgaJpZM4TzFpZ .
It seems that I can only hide it by modifying the style of CSS.
Yeah, I honestly haven't looked at that code for a long time. But that's sounds like one of the only valid solutions. Otherwise you could try and edit the source file yourself or try and get in contact with whoever made it
On Mon, Mar 4, 2019, 9:50 PM 苏日俪格 [email protected] wrote:
It seems that I can only hide it by modifying the style of CSS.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kimmobrunfeldt/progressbar.js/issues/213#issuecomment-469548093, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ3xQsHGY-RJ2Vc8EH9FJQF0GNMZhg4vks5vTgWkgaJpZM4TzFpZ .
ok, thanks for the answer.
It shows an empty bar but will not show the number within the circle.
For anyone reading this thread while trying to make this example always show the progress number (even when its value is 0), you have to remove the if (value === 0)
check.
Change this:
if (value === 0) {
circle.setText('');
} else {
circle.setText(value);
}
to that:
circle.setText(value);