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
This is my code that sets up the Bar Chart:
func setChart(chartview: BarChartView, xarray: [String], yarray: [Double], count: Int){ var dataEntries: [BarChartDataEntry] = [] for i in 0..<xarray.count { let dataEntry = BarChartDataEntry(x: Double(i), y: Double(yarray[i])) dataEntries.append(dataEntry) } let chartDataSet = BarChartDataSet(values: dataEntries, label: "") chartDataSet.drawValuesEnabled = true let chartData = BarChartData(dataSet: chartDataSet) let format = NumberFormatter() format.numberStyle = .none let formatter = DefaultValueFormatter(formatter: format) chartData.setValueFormatter(formatter) chartview.xAxis.valueFormatter = IndexAxisValueFormatter(values:xarray) chartview.xAxis.granularityEnabled = true chartview.xAxis.labelPosition = .bottom chartview.chartDescription?.enabled = false chartview.rightAxis.axisMinimum = 0.0 chartview.leftAxis.axisMinimum = 0.0 chartview.legend.enabled = false chartview.xAxis.drawGridLinesEnabled = false chartview.rightAxis.drawLabelsEnabled = false chartview.rightAxis.drawGridLinesEnabled = true chartview.xAxis.setLabelCount(count, force: false) chartview.leftAxis.axisMaximum = (yarray.max()! + 5) chartview.data = chartData }
Below is the chart and you can see there are double grid lines. How do I make it so it only shows one line per each Y value?
The text was updated successfully, but these errors were encountered:
Hello @martheli We are also facing same issue. Let me know how you are resolve that ?
Sorry, something went wrong.
No branches or pull requests
This is my code that sets up the Bar Chart:
Below is the chart and you can see there are double grid lines. How do I make it so it only shows one line per each Y value?
The text was updated successfully, but these errors were encountered: