We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I would like it to chop off leading zeros but only when the decimals are all zeros - but with an option true/false to do so as some may not like it.
only when the decimals are all zeros
What I mean:
Value = 100.00 then show only 100 Value = 265.50 then show only 265.50 Value = 134.36 then show only 134.36 Value = 23.45 then show only 23.45
I am looking for a way in meantime to hack it.
Thanks
The text was updated successfully, but these errors were encountered:
@leshacat
An easier solution would be to do the formatting before you submit it to the gage. Something like:
let value = 1.00; value.toString(); Number(value); // value is now 1
versus
let value = 1.0001; value.toString(); Number(value); // value is now 1.0001
follow with sending it to the gage.
gauge.refresh(value);
Sorry, something went wrong.
No branches or pull requests
I would like it to chop off leading zeros but
only when the decimals are all zeros
- but with an option true/false to do so as some may not like it.What I mean:
Value = 100.00 then show only 100
Value = 265.50 then show only 265.50
Value = 134.36 then show only 134.36
Value = 23.45 then show only 23.45
I am looking for a way in meantime to hack it.
Thanks
The text was updated successfully, but these errors were encountered: