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

Text not showing up when percent is 0 #55

Closed
miller-kevin opened this issue Apr 30, 2019 · 11 comments
Closed

Text not showing up when percent is 0 #55

miller-kevin opened this issue Apr 30, 2019 · 11 comments

Comments

@miller-kevin
Copy link

Looks like the code checks if(percent) before adding the text, when percent is 0, it won't get added.

I think this should be configurable via option. if (percent || options.forcePercentText) or something.

In my particular case, I'm using this plugin to display letter grades and the % progress to 100% (A+). If they received a 0, I'd still want to display F, but it gets hidden due to the above conditional. My current hack is to add .0001 to the % so it's never 0, but that's not very eloquent.

image

@miller-kevin
Copy link
Author

I'm not sure if this is maintained at all, but I've modified line 65 of percircle.js to be

image

And added this as part of the configuration to fix it

image

@teobais
Copy link
Owner

teobais commented May 1, 2019

Hi @whoisme555 ,

thanks a lot for using percircle!

As implied in #43 and #44, percircle is not actively maintained anymore.
That said, we would be more than happy to review a Pull Request with the suggested fix for the issue you just introduced :-)

Regards,
Theo

@miller-kevin
Copy link
Author

Sounds good, I'll look into submitting a pull request when I get some time.

@teobais
Copy link
Owner

teobais commented May 4, 2019

Cool!

@teobais
Copy link
Owner

teobais commented May 13, 2019

Any update here @whoisme555 ? :-)

@miller-kevin
Copy link
Author

miller-kevin commented May 13, 2019 via email

@teobais
Copy link
Owner

teobais commented May 15, 2019

Are we sure this is an issue?
For me, it seems to be working fine:
Screenshot 2019-05-15 at 21 49 51

Which browser are you testing on?

@miller-kevin
Copy link
Author

miller-kevin commented May 15, 2019 via email

@miller-kevin
Copy link
Author

image

image

I'm attaching pictures that didn't get attached when responding via email.

Maybe I'm using it wrong, but the first is my init code, and the next is the output if category.score is ever 0

@teobais
Copy link
Owner

teobais commented May 18, 2019

I see, there's maybe something else going wrong with the initialization of percent, since you're giving it a dynamic value. However, for now, I would like to accept this solution, so, let's take this discussion further at #56

@teobais
Copy link
Owner

teobais commented Jun 14, 2019

Closed with #56

@teobais teobais closed this as completed Jun 14, 2019
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

2 participants