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 add Strings on Left Axis in iOS-charts? #3702

Closed
reza-khalafi opened this issue Oct 21, 2018 · 1 comment
Closed

How to add Strings on Left Axis in iOS-charts? #3702

reza-khalafi opened this issue Oct 21, 2018 · 1 comment

Comments

@reza-khalafi
Copy link

Hello.
I want to set my custom array of String on left axis line.

let leftAxis = chartView.leftAxis
leftAxis.removeAllLimitLines()
leftAxis.gridLineDashLengths = [5, 5]
leftAxis.drawLimitLinesBehindDataEnabled = true
leftAxis.labelTextColor = .white
leftAxis.axisMinimum = 0
leftAxis.drawLabelsEnabled = true
let array = ["a","b","c","e","f","g","h"]
leftAxis.valueFormatter = IndexAxisValueFormatter(values: array)
leftAxis.granularity = 1

Not works.

@liuxuan30
Copy link
Member

ask on stack overflow for how-to questions.

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