Leocardoso94 / animated-number-vue

Super easy way to animate numbers.
https://codesandbox.io/s/v68x95mo30
MIT License
212 stars 31 forks source link

Problem formatting number #56

Open jonalxh opened 4 years ago

jonalxh commented 4 years ago

Hi, your component is what I was looking for, however I'm having problems when I pass values to the animated-number tag, i.e I set value to 14881 and it shows 14881000000001222, I've tried with toFixed(3) but some times I have small numbers and it adds three zeros to the end :

<animated-number :value="total_candidates ? total_candidates : 18000" :duration="1000" />

I have numbers from 0 to 500.000 and I want it to show numbers without a lot of extra values.

Is there a way to define that step will be one by one? How to avoid the sobrant numbers and maybe format it with hundred dot?

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label question to this issue, with a confidence of 0.61. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.