Add line in Scatter Graph. Below is normal code for draw the Scatter Graph using iOS Chart Framework.
let xAxisValue: [Double] = [21.7,22.2,22.5,22.6,22.7,22.8,22.8,22.7,22.6,22.3,22.0,22.0,21.6,21.1,20.5,20.0,19.7,19.2,18.8,18.1,17.8,16.8,16.8,16.5,16.0,15.5,15.5,15.0,13.7,13.0,12.2,12.1,11.1,10.7,9.4,9.1,8.7,7.6,7.2,6.1,4.7,4.3,3.9,3.5,3.0,2.7,2.3,1.9,1.6,1.6,1.6,2.3,1.9,1.9,3.0,4.6,5.7,6.4,6.8,6.8,7.0,7.1,7.1,7.1,7.1,7.6,9.1,10.7,12.2,13.7,21.7]
let yAxisValue: [Double] = [-1.1,-0.7,-0.1,0.0,1.5,3.0,4.6,6.1,7.6,9.1,10.7,10.7,12.2,13.7,15.2,16.2,16.8,17.7,18.3,19.4,19.8,21.0,21.0,21.3,21.8,22.3,22.4,22.9,23.9,24.4,25.0,25.1,25.7,25.9,26.5,26.6,26.8,27.2,27.4,27.4,27.4,25.9,24.4,22.9,21.1,19.8,18.3,16.8,15.5,15.2,14.4,13.9,12.2,11.1,10.5,9.2,7.6,6.1,4.6,3.4,3.0,2.3,1.5,1.2,0.1,0.0,-0.1,-0.3,-0.4,-0.6,-1.1]
let yVals1 = (0..<xAxisValue.count).map { (i) -> ChartDataEntry in
return ChartDataEntry(x: yAxisValue[i], y: xAxisValue[i])
}
let set1 = ScatterChartDataSet(entries: yVals1, label: "DS 1")
set1.setScatterShape(.chevronUp)
set1.setColor(ChartColorTemplates.colorful()[0])
set1.scatterShapeSize = 8
let data: ScatterChartData = [set1]
data.setValueFont(.systemFont(ofSize: 7, weight: .light))
chartView.data = data
Can't figure out how to draw line in scatter graph. Some suggestion is use ScatterChartRenderer class but not understand where to use that class. Expecting such type of result. Reference Image