title: Swift Charts X-Axis Not Displaying?
body: <p>I am using Swift Charts to create charts for an app but I cant seem to get the X-Axis labels to display.</p>
  
  <p>The chart is configured as follows:</p>
  
  <pre><code>func configure (dataPoints: [String], values: [Double]) {
      ChartIMG.noDataText = "Please Insert Some Data!"
      ChartIMG.xAxis.valueFormatter = IndexAxisValueFormatter(values: dataPoints)
      ChartIMG.xAxis.granularityEnabled = true
      ChartIMG.xAxis.granularity = 1
  
  
      ChartIMG.animate(xAxisDuration: 2.0, yAxisDuration: 2.0, easingOption: .easeInBounce)
  
      print(dataPoints)
  
      var dataEntries: [BarChartDataEntry] = []
  
      for i in 0..&lt;dataPoints.count {
          let dataEntry = BarChartDataEntry(x: Double(i), y: values[i])
          dataEntries.append(dataEntry)
      }
  
      let chartDataSet = BarChartDataSet(values: dataEntries, label: nil)
      ChartIMG.chartDescription?.enabled = false
      self.ChartIMG.legend.enabled = false
      let chartData = BarChartData(dataSet: chartDataSet)
      ChartIMG.data = chartData
  
  
  }
  </code></pre>
  
  <p>and the datasets are as follows:</p>
  
  <p>datapoints: <code>moodList = ["Great", "Good", "Meh", "Sad", "Awful"]</code></p>
  
  <p>Values: <code>valueList = [1.0, 2.0, 3.0, 1.0, 3.0]</code></p>
  
  <p>The chart X-Axis currently shows nothing and I cant seem to figure out why? Any help is much appreciated.</p>