         self.scatterGraph = newGraph
     }
 
-    // MARK: - Plot Data Source Methods
+}
+
+extension TrendViewController: CPTBarPlotDataSource, CPTBarPlotDelegate {
+
+    /** @brief @required The number of data points for the plot.
+     *  @param plot The plot.
+     *  @return The number of data points for the plot.
+     **/
     func numberOfRecords(for plot: CPTPlot) -> UInt
     {
         return UInt(self.dataForPlot.count)


import UIKit

class TrendViewController : UIViewController, CPTScatterPlotDataSource, CPTAxisDelegate {
    private var scatterGraph : CPTXYGraph? = nil

    typealias plotDataType = [CPTScatterPlotField : Double]
    private var dataForPlot = [plotDataType]()

    @IBOutlet var hostingView: CPTGraphHostingView!


        }
    }

    // MARK: Axis Delegate Methods
    private func axis(_ axis: CPTAxis, shouldUpdateAxisLabelsAtLocations locations: NSSet!) -> Bool
    {
        if let formatter = axis.labelFormatter {
