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

Integer for ChartDataEntry #1332

Closed
tuononh opened this issue Aug 18, 2016 · 4 comments
Closed

Integer for ChartDataEntry #1332

tuononh opened this issue Aug 18, 2016 · 4 comments

Comments

@tuononh
Copy link

tuononh commented Aug 18, 2016

How can I pass Int value to ChartDataEntry? My chart needs exact value instead of ,0
nh ch p man hinh 2016-08-18 luc 16 36 54

@LuoPengFei
Copy link

let dataEntry = ChartDataEntry(value:Double(values[i]), xIndex: i)
I think it will be OK

@tuononh
Copy link
Author

tuononh commented Sep 1, 2016

Actually, I want to display as Integer.
nh ch p man hinh 2016-09-01 luc 11 42 30

@MaDaLing
Copy link

MaDaLing commented Sep 1, 2016

let yFomatter: NSNumberFormatter = NSNumberFormatter()
yFomatter.minimumIntegerDigits = 1
yFomatter.minimumFractionDigits = 0
data.valueFormatter = yFomatter

@tuononh
Copy link
Author

tuononh commented Sep 1, 2016

Thanks, MaDaLing
nh ch p man hinh 2016-09-01 luc 15 56 09

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