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

When i set valueformatter , Have problem. #163

Closed
paneaktae opened this issue Jun 19, 2015 · 4 comments
Closed

When i set valueformatter , Have problem. #163

paneaktae opened this issue Jun 19, 2015 · 4 comments

Comments

@paneaktae
Copy link

lineChart.leftAxis.valueFormatter = NSNumberFormatter()
lineChart.leftAxis.valueFormatter?.numberStyle = NSNumberFormatterStyle.NoStyle

When i set valueformatter to normal number , It works but number display same This picture, Please Help me thank you.
screen shot 2558-06-19 at 10 26 13 am

@liuxuan30
Copy link
Member

this is because your yAxis label has decimals. You need to check if you set maximumFractionDigits to 0. non-zero means it can have decimals if possible

@paneaktae
Copy link
Author

iI try to set
lineChart.leftAxis.valueFormatter = NSNumberFormatter()
lineChart.leftAxis.valueFormatter?.numberStyle = NSNumberFormatterStyle.NoStyle
lineChart.leftAxis.valueFormatter?.maximumFractionDigits = 0

, But have problem same that picture. TT

@liuxuan30
Copy link
Member

Can you just walk through the API and definitions by yourself first? Your set the maximumFractionDigits to 0, do you know the meaning of maximumFractionDigits?

maximumFractionDigits
 Property
The maximum number of digits after the decimal separator allowed as input and output by the receiver.

@danielgindi
Copy link
Collaborator

You can also open a stackoverflow issue if you want help with iOS APIs

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

3 participants