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
I have added values for all bars but its not showing x-values corresponding to every bar. I am using this code :
class ChartStringFormatter: NSObject, IAxisValueFormatter {
var nameValues = [String]()
public func stringForValue(_ value: Double, axis: AxisBase?) -> String {
let index = Int(value.rounded())
if index < 0 || index >= nameValues.count || index != Int(value)
{
return ""
}
print("arry is",nameValues)
return String(describing: nameValues[Int(value)])
}
}
The text was updated successfully, but these errors were encountered:
Not every bar can show x value by default due to space limit. Check out ChartsDemo and computeAxisValues to see how the x entries are generated, and override it and supply what you need
@danielgindi :
I have added values for all bars but its not showing x-values corresponding to every bar. I am using this code :
class ChartStringFormatter: NSObject, IAxisValueFormatter {
}
The text was updated successfully, but these errors were encountered: