title: iOS-Charts Library: x-axis labels without backing data not showing
body: <p>I am using version 3.1.1 of the popular charts library for iOS. I have run into an issue with x-axis labeling that I can't seem to find the answer for online:</p>
  
  <p>Let's say I want to have a chart with one x-axis label for every day of the week (namely: S, M, T, W, T, F, S). Lots of forums I've read suggest taking the approach of setting a custom value formatter on the x-axis as suggested here: <a href="https://github.com/danielgindi/Charts/issues/1340" rel="noreferrer">https://github.com/danielgindi/Charts/issues/1340</a></p>
  
  <p>This works for calculating labels on days for which I have data. The issue I'm running into with this approach is that if I don't have data for a specific day, then the label for that day won't get generated.</p>
  
  <p>For example, if I were to use a custom value formatter that looked like this:</p>
  
  <pre><code>public class CustomChartFormatter: NSObject, IAxisValueFormatter {
  
      var days: = ["S", "M", "T", "W", "T", "F", "S"]
  
      public func stringForValue(value: Double, axis: AxisBase?) -&gt; String {
          return days[Int(value)]
      }
  
  }
  </code></pre>
  
  <p>and my backing data looked like this: [(0, 15.5), (1, 20.1), (6, 11.1)] where 0, 1, and 6 are representations of days, and 15.5, 20.1, and 11.1 are the data points on those days, then when <code>stringForValue</code> is called, some of the days will never get labels generated for them.</p>
  
  <p>Since <code>value</code> is always based on that backing data, it will never be equal to 2, 3, 4, or 5 in this scenario. As such, labels for "T", "W", "T", and "F" are never generated.</p>
  
  <p>Does anyone know how to force the library to generate 7 labels, one for each day of the week, regardless of what my backing data is? Thank you kindly.</p>