I want to turn the 1.00 and 2.00 into 1 and 2. When I try to change entry.y = Double(value)
to entry.y = Int(value)
it says it has to be a Double. How do I turn the values into whole numbers?
var entries = [PieChartDataEntry]()
for (index, value) in dataarray.enumerated() {
let entry = PieChartDataEntry()
entry.y = Double(value)
entry.label = self.labels[index]
entries.append(entry)
}
This is the chart I am using: