title: Charts 3.0 - Can not show decimal in BarChart - iOS Swift
body: <p>I had store my value in core data and display it at BarChart.
  My category amount is in 8.5 and 420.10.</p>
  
  <p>But the display at Bar Chart is 8 and 420.
  How should I set the value in decimal?</p>
  
  <p><a href="https://i.stack.imgur.com/CIAfO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CIAfO.png" alt="enter image description here"></a></p>
  
  <pre><code>var dataEntries: [BarChartDataEntry] = []
  
     for i in 0..&lt;dataPoints.count {
       let value = values[i] as Double
       print("value=\(value)")
       let dataEntry = BarChartDataEntry(x: Double(i), y:value)
       dataEntries.append(dataEntry)
   }
  
  let chartDataSet = BarChartDataSet(values: dataEntries, label: "Total Amount")
  chartDataSet.colors = [.red, .yellow, .green, .blue, .brown]
  chartDataSet.colors = ChartColorTemplates.joyful()
  barChartView.xAxis.labelPosition = .bottom
  barChartView.chartDescription?.text = ""
  barChartView.xAxis.drawGridLinesEnabled = false
  barChartView.leftAxis.drawLabelsEnabled = false
  barChartView.leftAxis.granularityEnabled = true
  
  let chartData = BarChartData()
  chartData.addDataSet(chartDataSet)
  barChartView.data = chartData
  </code></pre>