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

Y decimal values error #3725

Closed
fengqiangboy opened this issue Oct 31, 2018 · 1 comment
Closed

Y decimal values error #3725

fengqiangboy opened this issue Oct 31, 2018 · 1 comment

Comments

@fengqiangboy
Copy link

I have set leftAxis valueFormatter like this:

        let nfm = NumberFormatter()
        nfm.numberStyle = .decimal
        nfm.positiveSuffix = "%"
        nfm.negativeSuffix = "%"
        nfm.maximumFractionDigits = 1
        nfm.minimumFractionDigits = 1
        chartView.leftAxis.valueFormatter = DefaultAxisValueFormatter(formatter: nfm)

leftAxis label is correct. But it not work on value label.

image

@liuxuan30
Copy link
Member

you already knew the valueFormatter for axis, why don't you realize there is a

    /// Custom formatter that is used instead of the auto-formatter if set
    var valueFormatter: IValueFormatter? { get set }

on the data set class. It's the same concept :)

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

2 participants