                         self.priceStatsPriceArray.append(self.priceStats?.getPriceValue ?? 0.0)
                         self.priceStatsTimeStampArray.append(self.priceStats?.getTimeStampValue ?? "")
                         
-                        self.setChart(dataPoints: self.priceStatsTimeStampArray, values: self.priceStatsPriceArray) // TODO: - months to be removed
+                        self.setChart(dataPoints: self.priceStatsTimeStampArray, values: self.priceStatsPriceArray)
                     }
                 }
                 break

    }
    
    func addXValuesToBarChartView() {
        barChartView.xAxis.labelCount = priceStatsTimeStampArray.count // TODO: - months to be removed
        barChartView.xAxis.labelTextColor = UIColor.black
        barChartView.xAxis.valueFormatter = DefaultAxisValueFormatter {
            (value, axis) -> String in return self.priceStatsTimeStampArray[Int(value)] // TODO: - months to be removed
        }
    }
    
    func setChart(dataPoints: [String], values: [Double]) {      // TODO: - refactor this messy code.
        
        barChartView.noDataText = "You need to provide data for the chart."
        

class CGMainViewController: UIViewController, ChartViewDelegate {
   
    @IBOutlet weak var barChartView: BarChartView!
    
    var priceStats: CGPriceStats?
    var priceStatsPriceArray = [Double]()
