You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated to Swift 2.3 and have this error. I cannot figure it out and it was working before:
```
// MARK: - pie chart
func setChart(dataPoints: [String], values: [Double]) {
var dataEntries: [ChartDataEntry] = []
if values.count > 0 {
if dataPoints.count > 0 {
for i in 0..<dataPoints.count {
let dataEntry = ChartDataEntry(x: values[i], y: i)
dataEntries.append(dataEntry)
}
}
}
let pieChartDataSet = PieChartDataSet(values: dataEntries, label: "Bowel Movements")
let pieChartData = PieChartData(xVals: dataPoints, dataSet: pieChartDataSet)
pieChartView.data = pieChartData
pieChartDataSet.colors = GlobalColourConstants.bMColourTableArray
}
I get the following errors.
(https://cloud.githubusercontent.com/assets/8496722/18268851/7f53320e-741d-11e6-8f68-60c98f127e3b.jpg)
Cannot convert value of type 'Int' to expected argument type 'Double'
Cannot invoke initializer for type 'PieChartData' with an argument list of type '(xVals: [String], dataSet: PieChartDataSet)'
Any help is appreciated!
The text was updated successfully, but these errors were encountered:
I have updated to Swift 2.3 and have this error. I cannot figure it out and it was working before:
The text was updated successfully, but these errors were encountered: