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
I tried to create a CombinedChartView filled with one LineChart and one BarChart
Have a view with both chart
No data were drawn until I setted manually the data to CombinedChartData
Using Charts (3.2.2) Using Xcode 10.1 Using Swift 4.2 Using iOS 12.1
var dataEntries1 = [ChartDataEntry]() var dataEntries2 = [BarChartDataEntry]() for (index, vals) in content.enumerated() { dataEntries1.append(ChartDataEntry(x: Double(index), y: Double(vals.$1))) dataEntries2.append(BarChartDataEntry(x: Double(index), y: Double(vals.$2))) } let dataSet1 = LineChartDataSet(values: dataEntries1, label: "Distance (km)") dataSet1.axisDependency = .left dataSet1.circleRadius = 5 dataSet1.lineWidth = 2.0 dataSet1.setColor(UIColor.orange.withAlphaComponent(0.5)) dataSet1.setCircleColor(UIColor.orange) dataSet1.fillAlpha = 65 / 255.0 let dataSet2 = BarChartDataSet(values: dataEntries2, label: "Elevation (m)") dataSet2.axisDependency = .right // Work let data = CombinedChartData() data.lineData = LineChartData(dataSet: dataSet1) data.barData = BarChartData(dataSet: dataSet2) // Doesn't work let data = CombinedChartData(dataSets: [dataSet1, dataSet2]) self.chart.data = data
The text was updated successfully, but these errors were encountered:
refer ChartsDemo.
Sorry, something went wrong.
No branches or pull requests
What did you do?
I tried to create a CombinedChartView filled with one LineChart and one BarChart
What did you expect to happen?
Have a view with both chart
What happened instead?
No data were drawn until I setted manually the data to CombinedChartData
Charts Environment
Using Charts (3.2.2)
Using Xcode 10.1
Using Swift 4.2
Using iOS 12.1
Demo Project
The text was updated successfully, but these errors were encountered: