title: Using Charts. Swift 2.2
body: <p>I am very new to Charts so please bear with me!
  I have installed the 'Charts' CocoaPod (ByDaniel Cohen Gindi and Philipp Jahoda) and so far i have the following:</p>
  
  <p><a href="https://i.stack.imgur.com/l2Cau.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l2Cau.png" alt="enter image description here"></a></p>
  
  <p>And have the following code:</p>
  
  <pre><code>class AnalysisViewController: UIViewController, ChartViewDelegate {
  
  @IBOutlet weak var label4: UILabel!
  @IBOutlet weak var label3: UILabel!
  @IBOutlet weak var label2: UILabel!
  @IBOutlet weak var label1: UILabel!
  @IBOutlet weak var barChartView: BarChartView!
  
  var testName : [String]!
  
  func setChart(dataPoints: [String], values: [Double]) {
      barChartView.descriptionText = ""
      barChartView.noDataText = "You need to provide data for the chart."
  
      var dataEntries: [BarChartDataEntry] = []
  
      for i in 0..&lt;dataPoints.count {
          let dataEntry = BarChartDataEntry(value: values[i], xIndex: i)
          dataEntries.append(dataEntry)
      }
  
      let chartDataSet = BarChartDataSet(yVals: dataEntries, label: nil)
      let chartData = BarChartData(xVals: testName, dataSet: chartDataSet)
      barChartView.data = chartData
      chartData.setDrawValues(false)
  
  
      chartDataSet.colors = [UIColor(red: 250/255, green: 16/255, blue: 34/255, alpha: 1), UIColor(red: 235/255, green: 166/255, blue: 134/255, alpha: 1),UIColor(red: 135/255, green: 66/255, blue: 255/255, alpha: 1), UIColor(red: 35/255, green: 11/255, blue: 15/255, alpha: 1)]
      barChartView.xAxis.labelPosition = .Bottom
  }
  
  
  func chartValueSelected(chartView: ChartViewBase, entry: ChartDataEntry, dataSetIndex: Int, highlight: ChartHighlight) {
      print("\(entry.value) in \(months[entry.xIndex])")
  
      //need to set chartData.setDrawValues(true)
  }
  
  func setLabels() {
      label1.text = testName[0]
      label2.text = testName[1]
      label3.text = testName[2]
      label4.text = testName[3]
  
      label1.textColor = UIColor(red: 250/255, green: 16/255, blue: 34/255, alpha: 1)
      label2.textColor = UIColor(red: 235/255, green: 166/255, blue: 134/255, alpha: 1)
      label3.textColor = UIColor(red: 135/255, green: 66/255, blue: 255/255, alpha: 1)
      label4.textColor = UIColor(red: 35/255, green: 11/255, blue: 15/255, alpha: 1)
  }
  
  override func viewDidLoad() {
   barChartView.delegate = self
  
   testName = ["Food", "Entertainment", "Misc", "Clothes"]
  
  let unitsSold = [20.0, 4.0, 6.0, 3.0]
  
  
      setChart(testName, values: unitsSold)
      setLabels()
  }
  </code></pre>
  
  <p>I was wondering about the following:</p>
  
  <ol>
  <li>How can i remove the x-axis labels? </li>
  <li>How can i remove the "Key" (coloured squares) as i am aiming to produce a table underneath the chart but using labels for this purpose. </li>
  <li>When you select a value on the chart display that values numerical value. I tried to set the ChartDataEntry's setDraw value however this did not work "      ChartDataEntry.setDrawValues(true)". </li>
  <li>Can you set limits per value rather than the whole  chart? Similar to what you see on Box Plots. </li>
  <li>How do i remove the y-axis on the right hand side?</li>
  </ol>
  
  <p>Apologies if this is not the correct place to ask these questions. I am new and have been struggling to find the answers else where. </p>
  
  <p>Thanks,</p>
  
  <p>Jess</p>