Is it possible to automatically smooth data for a line chart, so that it displays as a nice graceful curve rather than jagged up-down lines? Or do I need to manually manipulate my data?
Edit: added an example of jagged-line chart
sciChartSurface = SCIChartSurface()
view.addSubview(sciChartSurface)
sciChartSurface.translatesAutoresizingMaskIntoConstraints = false
sciChartSurface.topAnchor.constraint(equalTo: view.topAnchor).isActive = true
sciChartSurface.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true
sciChartSurface.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
sciChartSurface.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true
let xAxis = SCIDateTimeAxis()
xAxis.visibleRange = SCIDateRange(dateMin: Date().addingTimeInterval(-86400), max: Date().addingTimeInterval(2 * 86400))
xAxis.growBy = SCIDoubleRange(min: SCIGeneric(0.1), max: SCIGeneric(0.1))
xAxis.textFormatting = "MMM d"
sciChartSurface?.xAxes.add(xAxis)
let yAxis = SCINumericAxis()
yAxis.textFormatting = "%.1f"
yAxis.axisTitle = "Temperature"
sciChartSurface?.yAxes.add(yAxis)
lineDataSeries = SCIXyDataSeries(xType: .dateTime, yType: .double)
lineDataSeries.appendX(SCIGeneric(Date().addingTimeInterval(-86400)), y: SCIGeneric(28))
lineDataSeries.appendX(SCIGeneric(Date()), y: SCIGeneric(30))
lineDataSeries.appendX(SCIGeneric(Date().addingTimeInterval(86400)), y: SCIGeneric(26))
lineDataSeries.appendX(SCIGeneric(Date().addingTimeInterval(2 * 86400)), y: SCIGeneric(28))
let series = SCIFastLineRenderableSeries()
series.dataSeries = lineDataSeries
series.strokeStyle = SCISolidPenStyle(colorCode: 0xFF279B27, withThickness: 1.0)
sciChartSurface.renderableSeries.add(series)
SciChart supports a type of Spline interpolation via a custom series. You can see an example here:
iOS Custom Series Spline Line Example
This requires creating a custom series (full source code is provided in the example above, and also hosted on GitHub here.)
Edit: update
Scichart iOS/Android now supports spline line out of the box