SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components


SplineLineRenderableSeries doesn’t render curved graph line properly in Swift , it renders stepped line for the data series .For reference please check the Screenshot attached ,ECG line(Green) rendered as stepped line (Marked by rectangle). Let me know anything I need to update in my code

Please find below the code for initialisation go the graph and updating the graph same. I am updating graph realtime with same DataSeries.

  1. Graph initialisation code

    func init_ECG_Chart()
    //Remove Theme From Chart By Apply & Remove & Change Border color
    SCIThemeManager.applyTheme(to: self.ecg_Chart_Surface, withThemeKey: SCIChart_Bright_SparkStyleKey)
    SCIThemeManager.removeTheme(byThemeKey: SCIChart_Bright_SparkStyleKey)

    self.ecg_Chart_Surface.isOpaque = false
    self.ecg_Chart_Surface.backgroundColor = .clear
    self.ecg_Chart_Surface.renderableSeriesAreaBorderStyle = SCISolidPenStyle(color: .clear, thickness: 0)
    let lineSeries = SCISplineLineRenderableSeries()
    lineSeries.strokeStyle = SCISolidPenStyle(color: ecgSelectedColor, thickness: 2.0)
    lineSeries.dataSeries = ecgLineDataSeries

    // lineSeries.resamplingMode = SCIResamplingMode_None //Resampling off
    // lineSeries.resamplingMode = SCIResamplingMode_Auto //Resampling off

    let xAxis = SCINumericAxis()
    xAxis.axisAlignment = .bottom
    xAxis.drawLabels = false
    xAxis.drawMajorGridLines = false
    xAxis.drawMinorGridLines = false
    xAxis.drawMajorTicks = false
    xAxis.drawMinorTicks = false
    let yAxis = SCINumericAxis()
    yAxis.axisAlignment = .left
    yAxis.drawLabels = false
    yAxis.drawMajorGridLines = false
    yAxis.drawMinorGridLines = false
    yAxis.drawMajorTicks = false
    yAxis.drawMinorTicks = false
    yAxis.autoRange = .never   //Stop auto ranging axis
    yAxis.visibleRange = SCIDoubleRange(min: -32, max: 96)

    // yAxis.visibleRangeLimit = SCIDoubleRange(min: -32, max: 96)

    yAxis.growBy = SCIDoubleRange(min: 0.2, max: 0.2)
    SCIUpdateSuspender.usingWith(self.ecg_Chart_Surface) {
        self.ecg_Chart_Surface.xAxes.add(items: xAxis)
        self.ecg_Chart_Surface.yAxes.add(items: yAxis)
        self.ecg_Chart_Surface.renderableSeries.add(items: lineSeries)
        //self.ecg_Chart_Surface.chartModifiers.add(items: SCIZoomExtentsModifier(),SCIPinchZoomModifier())

    } //Init ECG

  2. Graph updation code

    func update_ECG_Chart(xValues:SCIDoubleValues,yValues:SCIDoubleValues)

    SCIUpdateSuspender.usingWith(self.ecg_Chart_Surface) {
        self.ecgLineDataSeries.append(x: xValues, y: yValues)
      //  self.ecg_Chart_Surface.zoomExtents()

    } //Update ECG

Latest available for download
  • Oleksandr Shvets
    Hi Djkaran Nasa, Thanks for your inquiry. Unfortunately, we have noticed your license support has expired. If you wish to continue receiving technical support further please consider renewing your support subscription. To do that please contact Sales here: Or email us at With best regards, Oleksandr
  • You must to post comments

Hi, there.

It is very hard to tell what is wrong without any example, because the Spline line drawing highly depends on the data, that you append to the dataSeries. Probably, there is too much data for such a small visible range but that is only my guess.

Please provide a test example or reproduce your issue on one of our examples so we can reproduce your issue and find a solution for you.

Thanks in advance

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.