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

Line Graph xValue #3367

Closed
scottcourtney opened this issue Mar 28, 2018 · 3 comments
Closed

Line Graph xValue #3367

scottcourtney opened this issue Mar 28, 2018 · 3 comments

Comments

@scottcourtney
Copy link

Is there a way to attach an array of string values to the x axis? I have tried IndexAxisValueFormatter(values: dateEntry) with setLabelCount(dateEntry.count, force: true) and I have 7 values with a count of 7 but my graph does not show the label.

@puvvadakalyani
Copy link

puvvadakalyani commented Mar 30, 2018

I am also having same problem. Not able to assign XAxis values. Any solutions?

@DJGavin
Copy link

DJGavin commented Apr 10, 2018

open func stringForValue(_ value: Double,
axis: AxisBase?) -> String
{
let index = Int(value.rounded())
// guard values.indices.contains(index), index != Int(value) else { return "" }
 我发现这里注释掉 可以显示 但是不知道对整个程序有什么影响
return _values[index]
}

@jjatie
Copy link
Collaborator

jjatie commented Apr 15, 2018

Please note that for how-to's, ask on Stack Overflow. If you would like to file an issue or feature request, please fill out the form provided.

@jjatie jjatie closed this as completed Apr 15, 2018
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