I am not sure how IOS Charts
should behave when there is only 1 value to display, but for me it crashes all the time with the error: fatal error: Index out of range
Here is where the problem is happening:
func stringForValue(_ value: Double, axis: AxisBase?) -> String {
let period = getXValues()
return period[Int(value)]
}
value
comes as -1.
Did someone had this issue before ?
Or is there a way to display data only when there is minimum 2 values ?