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

How to format values on barchart #2708

Closed
BaranBerk opened this issue Aug 12, 2017 · 5 comments
Closed

How to format values on barchart #2708

BaranBerk opened this issue Aug 12, 2017 · 5 comments

Comments

@BaranBerk
Copy link

If I have big numbers in values they shown on top of each other. I would like to show them like 1M, 2.3K and etc. Is there any way to format values on barchart
barchartvalues

@liuxuan30
Copy link
Member

Use valueFormatter for you data sets

@BaranBerk
Copy link
Author

My format changes according to value and cannot set different formatter for different values. For 1000 I would like to use 1K and 1000000 I would like to use 1M but formatter doesn't get a formatter array. Thanks

@thierryH91200
Copy link
Contributor

thierryH91200 commented Aug 15, 2017

If it can help you

"https://en.wikipedia.org/wiki/Metric_prefix"

LargeValueFormatter.swift.zip

and

data.setValueFont( NSUIFont(name: "HelveticaNeue-Light", size: CGFloat(10.0)))
           data.setValueFormatter(LargeValueFormatter())

leftAxis.valueFormatter = LargeValueFormatter()

capture d ecran 2017-08-15 a 09 16 08

@BaranBerk
Copy link
Author

This is exactly what I am looking for thank you

@AppCodeZip
Copy link

barchart

I think it can help you.
https://www.appcodezip.com/2021/06/YAxis-format-values-K-Lakh-crore.html

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