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

Fix: parcentage value calculation is fixed so the value is rounded. #98

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mtskf
Copy link

@mtskf mtskf commented Jun 20, 2019

The percentage value was calculated by .toFixed method which just cut the decimal values like Math.floor. I updated the logic for the percentage values so it's properly rounded at the specified decimal position by the precision option.

ie:
When the value is 56.5556 and the precision is 1:
original version: 56.5%
updated version: 56.6%

I'd appreciate if you could merge this fix.
Cheers:)

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

Successfully merging this pull request may close these issues.

None yet

1 participant