progressbar.js icon indicating copy to clipboard operation
progressbar.js copied to clipboard

Cant have an empty progress bar

Open NathanHennigh opened this issue 6 years ago • 7 comments

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.

NathanHennigh avatar May 04 '18 18:05 NathanHennigh

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.

kimmobrunfeldt avatar May 28 '18 17:05 kimmobrunfeldt

@NathanHennigh This problem also exists in my project. Is your problem solved?

YuFy1314 avatar Mar 05 '19 05:03 YuFy1314

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 .

NathanHennigh avatar Mar 05 '19 05:03 NathanHennigh

It seems that I can only hide it by modifying the style of CSS.

YuFy1314 avatar Mar 05 '19 05:03 YuFy1314

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 .

NathanHennigh avatar Mar 05 '19 05:03 NathanHennigh

ok, thanks for the answer.

YuFy1314 avatar Mar 05 '19 06:03 YuFy1314

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);

over-engineer avatar Oct 27 '19 13:10 over-engineer