         scatterRenderableSeries = SCIXyScatterRenderableSeries()
         scatterRenderableSeries.dataSeries = scatterDataSeries
         
-        chartSurface?.renderableSeries.add(lineRenderableSeries)
-        chartSurface?.renderableSeries.add(scatterRenderableSeries)
+        sciChartSurface?.renderableSeries.add(lineRenderableSeries)
+        sciChartSurface?.renderableSeries.add(scatterRenderableSeries)
     }
 }


class ViewController: UIViewController {
    
    var chartView: SCIChartSurfaceView?
    var chartSurface: SCIChartSurface?
    
    var lineDataSeries: SCIXyDataSeries!
    var scatterDataSeries: SCIXyDataSeries!

    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        // Do any additional setup after loading the view, typically from a nib.
        
        sciChartSurface = SCIChartSurface(frame: self.view.bounds)
        sciChartSurface?.translatesAutoresizingMaskIntoConstraints = true
        
        self.view.addSubview(sciChartSurface!)
        
        sciChartSurface?.xAxes.add(SCINumericAxis())
        sciChartSurface?.yAxes.add(SCINumericAxis())
        
        createDataSeries()
        createRenderableSeries()
        
        sciChartSurface?.invalidateElement()

    }
    
    func createDataSeries(){
        // Init line data series
        lineDataSeries = SCIXyDataSeries(xType: .int16, yType: .int16)
        for i in 0..<10{
            lineDataSeries.appendX(SCIGeneric(i), y: SCIGeneric(i*2))
        }
        
        // Init scatter data series
        scatterDataSeries = SCIXyDataSeries(xType: .int16, yType: .int16)
        for i in 0..<10{
            scatterDataSeries.appendX(SCIGeneric(i), y: SCIGeneric(i*2 - i))
        }
