You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use IAxisValueFormatter protocol and then implement the protocol method: func stringForValue(_ value: Double, axis: AxisBase?) -> String
where you return the string you want to represent on the xAxis.
example:
let vowels = ["A", "E", "I", "O", "U"]
func stringForValue(_ value: Double, axis: AxisBase?) -> String {
// Check to make sure the value doesn't go out of index range
if Int(value) < vowels.count && Int(value) >= 0 {
return vowels[Int(value)]
} else {
return "consonant"
}
}
No description provided.
The text was updated successfully, but these errors were encountered: