 
 }
 
-extension TrendViewController: CPTBarPlotDataSource, CPTBarPlotDelegate {
+extension TrendViewController: CPTPlotDataSource {
 
     /** @brief @required The number of data points for the plot.
      *  @param plot The plot.

     **/
    func numberOfRecords(for plot: CPTPlot) -> UInt {
        guard let model: TrendsAlgorithmModel = trendsAlgorithmModel,
        let trendUnwrapped = trend else { return 0 }
        switch trendUnwrapped {
        case .bg:
            return UInt(model.bgArrayCount())

    /// set axes range start and length
    func configurePlotSpace(graph: CPTXYGraph, trend: Trend) {
        let plotSpace = graph.defaultPlotSpace as! CPTXYPlotSpace

        plotSpace.delegate = self

        plotSpace.allowsUserInteraction = true

        // limit scrolling?
