ios charts not displaying line/bar in charts
<p>I am working on <a href="https://github.com/danielgindi/Charts" rel="nofollow noreferrer">ios-charts</a> by Daniel Gindi on swift 3.0. I have written following code for bar charts</p>

<pre><code>var dataEntries: [BarChartDataEntry] = []
for i in 0..&lt;dateTime.count {
    let dateFormatter = DateFormatter()
    dateFormatter.dateFormat = "MM/dd/yyyy hh:mm:ss aa"
    let dateObj = dateFormatter.date(from: dateTime[i])
    let timeIntervalForDate = dateObj!.timeIntervalSince1970
    let dataEntry = BarChartDataEntry(x: Double(timeIntervalForDate), y: Double(readings[i]))
    dataEntries.append(dataEntry)
}
let chartDataSet = BarChartDataSet(values: dataEntries, label: "Units")
let chartData = BarChartData(dataSet: chartDataSet)
self.ChartsView.data = chartData
</code></pre>

<p>i get following result in emulator:
<a href="https://i.stack.imgur.com/NeCRe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NeCRe.png" alt="enter image description here"></a></p>

<p>you can see no red line reflecing my values. I even zoomed to charts but nothing was shown.</p>

<p>I also tried line chart with sample values. Here is the code: </p>

<pre><code>let dollars1 = [20.0, 4.0, 6.0, 3.0, 12.0, 16.0, 4.0, 18.0, 2.0, 4.0, 5.0, 4.0]
let months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
var yValues : [ChartDataEntry] = [ChartDataEntry]()
for i in 0 ..&lt; months.count {
    yValues.append(ChartDataEntry(x: Double(i + 1), y: dollars1[i]))
}
let LineData = LineChartData()
let ds = LineChartDataSet(values: yValues, label: "Months")

LineData.addDataSet(ds)
self.ChartsView.data = LineData
</code></pre>

<p>Its result is even more weird. No grid lines are shown either in this chart. Here is the image.</p>

<p>I am not sure what is wrong with these graphs. Am I missing something. So far i am unable to look any furthur as most solutions are using old version of charts(or may be it is something else i am not aware). Please guide me to proper direction. Thanks</p>

<p><a href="https://i.stack.imgur.com/xTPhn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xTPhn.png" alt="enter image description here"></a></p>