title: Horizontal bar chart by ios-charts
body: <p>How to create horizontal bar chart by ios-charts in xcode?
  I created View with class HorizontalBarChartView</p>
  
  <pre><code>@IBOutlet weak var horChart: HorizontalBarChartView!
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      // Do any additional setup after loading the view.
  
      let months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]
      let unitsSold = [20.0, 4.0, 6.0, 3.0, 12.0, 16.0]
  
      setChart(months, values: unitsSold)
  
  }
  
  func setChart(dataPoints: [String], values: [Double]) {
  
      var dataEntries: [ChartDataEntry] = []
  
      for i in 0..&lt;dataPoints.count {
          let dataEntry = ChartDataEntry(value: values[i], xIndex: i)
          dataEntries.append(dataEntry)
      }
  
      let chartDataSet = BarChartDataSet(yVals: dataEntries, label: "Units Sold")
      let chartData = BarChartData(xVals: dataPoints, dataSet: chartDataSet)
      horChart.data = chartData
  
  }
  </code></pre>
  
  <p>Didnt find any examples in the Internet</p>