I updated charts from 3.6.0 to 4.0.1 and i am getting this error:
Value of type 'ChartData' has no member 'getDataSetByIndex'
My code:
if let data = altimetriaChartView.data, data.dataSetCount > 1, let lineChart: LineChartDataSet = data.getDataSetByIndex(1) as? LineChartDataSet {
}
How can i solve that error?
CodePudding user response:
Try accessing it like an ordinary swift array instead,
data[1] as? LineChartDataSet