How to render only chosen axis labels in ios Charts
<p>Library I'm using: <a href="https://github.com/danielgindi/Charts" rel="nofollow">charts</a><br>
I have line chart with values at specific days in year. I don't want to draw each day as label on x axis (there may be more than 300 days range) so I'm looking to draw months only. Right now, my xVals looks like: [nil, nil, nil, "07/2016", nil nil nil (..)]. Unfortunately, no label are displayed.<br>
Is there any other way to achieve desired behaviour?
<br>
<br>
Code (x axis values): <br></p>

<pre><code>while date.compare(to) != NSComparisonResult.OrderedDescending { // iterate over all days in range
        let components = currentCalendar.components([.Day, .Month , .Year], fromDate: date)
        if components.day != 1 {
            vals.append(nil)
        } else { // first day of the month
            vals.append(String(components.month) + " / " + String(components.year))
        }

        let incrementComponents = NSDateComponents()
        incrementComponents.day = 1
        date = currentCalendar.dateByAddingComponents(incrementComponents, toDate: date, options: [])!
}
</code></pre>

<p>And entries:</p>

<pre><code>for point in base!.points {
        if let index = chartValuesFormatter?.indexFromDate(point.date) {
            entries.append(ChartDataEntry(value: point.value, xIndex: index))
        }
}
</code></pre>

<p>Generally it works, when I specify all values some of them are displayed and entries are rendered correctly. My only problem is to display only month labels on the beginning of month periods.</p>