title: Values are not showing on chart graph swift
body: <p>I am using <a href="https://github.com/danielgindi/Charts" rel="nofollow noreferrer">chart</a> library to plot graph in swift. I want to show below values on LineChartView.
  My values are as follows.</p>
  
  <p>1) x: 0.0 y: 0.62020133693747</p>
  
  <p>2) x: 0.0 y: 0.62020133693747</p>
  
  <p>3) x: 0.0 y: 0.62020133693747</p>
  
  <p>4) x: 8500.0 y: 0.62020133693747</p>
  
  <p>5) x: 8500.0 y: 0.925703706122449</p>
  
  <p>6) x: 9000.0 y: 0.925703706122449</p>
  
  <p>7) x: 9000.0 y: 1.43307403327373</p>
  
  <p>8) x: 9500.0 y: 1.43307403327373</p>
  
  <p>9) x: 9500.0 y: 0.37799568</p>
  
  <p>10) x: 9500.0 y: 0.37799568</p>
  
  <p>11) x: 9500.0 y: 0.37799568</p>
  
  <p>12) x: 9000.0 y: 0.37799568</p>
  
  <p>13) x: 9000.0 y: 0.269996914285714</p>
  
  <p>14) x: 8500.0 y: 0.269996914285714</p>
  
  <p>15) x: 8500.0 y: 0.239997257142857</p>
  
  <p>16) x: 6000.0 y: 0.239997257142857</p>
  
  <p>17) x: 6000.0 y: 0.219552079597251</p>
  
  <p>18) x: 0.0 y: 0.219552079597251</p>
  
  <p>19) x: 0.0 y: 0.453594816</p>
  
  <p>20) x: 0.0 y: 0.453594816</p>
  
  <p>From these values the expected graph is:</p>
  
  <p><a href="https://i.stack.imgur.com/jykzg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jykzg.png" alt="Expected Graph"></a></p>
  
  <p>But when I am using <a href="https://github.com/danielgindi/Charts" rel="nofollow noreferrer">chart</a> library I am getting the following graph:</p>
  
  <p><a href="https://i.stack.imgur.com/Bsi69.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Bsi69.png" alt="Current Graph"></a> </p>
  
  <p>It seems that the library is not able to plot the last values.</p>
  
  <p>I have tried various setting but it didn't solve my issue.</p>
  
  <p>My Code:</p>
  
  <pre><code>`func updateChartValues(arrLineCDE: Array&lt;ChartDataEntry&gt;) -&gt; (LineChartDataSet) {
  
  let Xvalues: [Double] = [/*All My X values are here*/]
  let Yvalues: [Double] = [/*All My Y values are here*/]
  var entries: [ChartDataEntry] = Array()
  
  for (i, x) in Xvalues.enumerated() {
      entries.append(ChartDataEntry(x: Xvalues[i], y: Yvalues[i], data: UIImage(named: "icon", in: Bundle(for: self.classForCoder), compatibleWith: nil)))
  }
  self.dataSet = LineChartDataSet(values: entries, label: "Depth vs. FV")
  self.dataSet.mode = LineChartDataSet.Mode.cubicBezier
  return dataSet
  }`
  </code></pre>
  
  <p>Line Chart Sttings</p>
  
  <pre><code>`func setLineChartProperty(lineChartView lcv: LineChartView) {
  //Line Chart Setting:
  // lcv.delegate = self
  lcv.setViewPortOffsets(left: 44.0, top: 30.0, right: 44.0, bottom: 44.0)
  lcv.backgroundColor = darkBlueColor
  lcv.chartDescription?.enabled = false
  lcv.dragEnabled = false
  lcv.setScaleEnabled(false)
  lcv.pinchZoomEnabled = false
  lcv.drawGridBackgroundEnabled = false
  
  lcv.xAxis.labelFont = UIFont(name: "HelveticaNeue-Light", size: CGFloat(12.0))!
  lcv.xAxis.setLabelCount(6, force: false)
  lcv.xAxis.labelTextColor = UIColor.white
  lcv.xAxis.labelPosition = .bottom
  lcv.xAxis.axisLineColor = UIColor.white
  lcv.xAxis.gridColor = UIColor.white
  lcv.xAxis.drawGridLinesEnabled = true
  lcv.xAxis.axisMaximum = 10000
  lcv.xAxis.axisMinimum = 0
  
  lcv.leftAxis.labelFont = UIFont(name: "HelveticaNeue-Light", size: CGFloat(12.0))!
  lcv.leftAxis.setLabelCount(6, force: false)
  lcv.leftAxis.labelTextColor = UIColor.white
  lcv.leftAxis.labelPosition = .outsideChart
  lcv.leftAxis.axisLineColor = UIColor.white
  lcv.leftAxis.gridColor = UIColor.white
  lcv.leftAxis.drawGridLinesEnabled = true
  
  lcv.legend.horizontalAlignment = .right
  lcv.legend.verticalAlignment = .bottom
  lcv.legend.orientation = .horizontal
  lcv.legend.drawInside = true
  lcv.legend.form = .square
  lcv.legend.formSize = 8.0
  lcv.legend.formToTextSpace = 4.0
  lcv.legend.xEntrySpace = 6.0
  
  lcv.xAxis.enabled = true
  lcv.rightAxis.enabled = false
  lcv.leftAxis.enabled = true
  lcv.legend.enabled = true
  lcv.legend.textColor = UIColor.white
  lcv.animate(xAxisDuration: 1.0, yAxisDuration: 1.0)
  
  }`
  </code></pre>