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
In Swift 2.3 I'm able to set xAxis values from array. Now in Swift 3.0, not able to set.
I want to assign custom values from my array.
dataPoints = ["18","17","16","15","14","13","12"...] // It contains last 30 days from current date, that's why it contain 18 1st because 18 is current date.
values = [65.66,68.78,64.66,63.37...]
func setChart(dataPoints: [String], values: [Float])
{
barChartView.noDataText = "You need to provide data for the chart."
for i in 1..<dataPoints.count
{
let dataEntry = BarChartDataEntry(x: Double(i), yValues: [Double(values[i])])
dataEntries.append(dataEntry)
}
print("ChartDataEntry :\(dataEntries)")
let chartDataSet = BarChartDataSet(values: dataEntries, label: "INR Rates(₹)/$")
let chartData = BarChartData(dataSet: chartDataSet)
barChartView.data = chartData](url)
}
Please help me to assign values for x-Axis using swift 3.0
The text was updated successfully, but these errors were encountered:
In Swift 2.3 I'm able to set xAxis values from array. Now in Swift 3.0, not able to set.
I want to assign custom values from my array.
dataPoints = ["18","17","16","15","14","13","12"...] // It contains last 30 days from current date, that's why it contain 18 1st because 18 is current date.
values = [65.66,68.78,64.66,63.37...]
Please help me to assign values for x-Axis using swift 3.0
The text was updated successfully, but these errors were encountered: