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

Showing .0, .00 accoding the the decimal places insted of 0 in graphs #2987

Closed
CosmicYogi opened this issue Nov 13, 2017 · 4 comments
Closed

Comments

@CosmicYogi
Copy link

When I am plotting the values in graphs then it is showing ".00" or ".0" when there are no values at the moment in LineChart.

It shows 0 if there are values with one decimal else it shows ".0" if there are values with one decimal else it shows ".00" if there are values with two decimals

Images are added for the reference.
screen shot 2017-11-13 at 8 23 05 pm
screen shot 2017-11-13 at 8 23 16 pm
screen shot 2017-11-13 at 8 23 25 pm

What I want is I want it to be either 0.00 or the best can be done is it can be "0" in every case when the value of the graph is 0.

@liuxuan30
Copy link
Member

liuxuan30 commented Nov 15, 2017

use valueFormatter(NSNumberFormatter) will do the job.

@CosmicYogi
Copy link
Author

Thanks man.
Finally worked.

@lee727n
Copy link

lee727n commented Apr 17, 2018

how to resove this problem , i meet the same problem . how to control every point Y value shows 0; i don't know how to use valuefomatter. i think this function use in Y axis . don't use in point Y

@fanmaoyu0871
Copy link

how to resove this problem , i meet the same problem . how to control every point Y value shows 0; i don't know how to use valuefomatter. i think this function use in Y axis . don't use in point Y

i also have this question.

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

4 participants