We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hello
I draw the bar chart with label.
But bar charts of all is a blue.
Each represented a different color.
It is a bug?
Below the code :
var yVals = [BarChartDataEntry]() let dataFormatter = DateFormatter() dataFormatter.locale = Locale(identifier: "en_US") dataFormatter.dateStyle = .medium dataFormatter.dateFormat = "MMM dd" for i in 0..<data.count - 1 { let readData = data[i][1] yVals.append(BarChartDataEntry(x: Double(i), y: Double(readData)!)) } let todayTime = dataFormatter.date(from: data[data.count-1][0]) let tommorrowTime = dataFormatter.date(from: data[data.count-1][1]) let dayAfterTommorrowtodayTime = dataFormatter.date(from: data[data.count-1][2]) dataFormatter.dateFormat = "yyyy-MM-dd" var convertTime = dataFormatter.string(from: todayTime!) let dataSetToday = BarChartDataSet(values: yVals, label: convertTime) dataSetToday.colors = [UIColor.lightGray] for i in 0..<data.count - 1 { let readData = data[i][2] yVals.append(BarChartDataEntry(x: Double(i+9), y: Double(readData)!)) } convertTime = dataFormatter.string(from: tommorrowTime!) let dataSetTommorrow = BarChartDataSet(values: yVals, label: convertTime) dataSetTommorrow.colors = [UIColor.red] for i in 0..<data.count - 1 { let readData = data[i][3] yVals.append(BarChartDataEntry(x: Double(i+18), y: Double(readData)!)) } convertTime = dataFormatter.string(from: dayAfterTommorrowtodayTime!) let dataSetDayAfterTommorrow = BarChartDataSet(values: yVals, label: convertTime) dataSetDayAfterTommorrow.colors = [UIColor.blue] let dataSets: [BarChartDataSet] = [dataSetToday, dataSetTommorrow, dataSetDayAfterTommorrow] self.magneticForcastBarView.fitBars = true self.magneticForcastBarView.data = BarChartData(dataSets: dataSets) self.magneticForcastBarView.animate(xAxisDuration: 2.0, yAxisDuration: 2.0, easingOption: .easeInBounce)
thank you
The text was updated successfully, but these errors were encountered:
dataSetDayAfterTommorrow.colors = [UIColor.blue] you set it all blue and you ask why..
Sorry, something went wrong.
No branches or pull requests
hello
I draw the bar chart with label.
But bar charts of all is a blue.
Each represented a different color.
It is a bug?
Below the code :
thank you
The text was updated successfully, but these errors were encountered: