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
anyone can help me? I try several time to solve the problem <img width="132" alt="screen shot 2560-10-30 at 21 11 09" src="https://user-
this is my code
func setChart(dataPoints: [String], values: [Double]) { barChartView.delegate = self barChartView.chartDescription?.enabled = false barChartView.highlightPerTapEnabled = false barChartView.drawValueAboveBarEnabled = false barChartView.fitBars = true barChartView.drawBarShadowEnabled = false barChartView.drawGridBackgroundEnabled = false barChartView.pinchZoomEnabled = false barChartView.doubleTapToZoomEnabled = false // barChartView.autoScaleMinMaxEnabled = true // barChartView.scaleYEnabled = false // barChartView.scaleXEnabled = false barChartView.animate(xAxisDuration: 0.5, yAxisDuration: 0.5, easingOption: .easeInBounce)
let axisMinimum = 0.0 let axisMaximum = 3.0 let rightAxis = barChartView.rightAxis rightAxis.enabled = false rightAxis.axisMinimum = axisMinimum rightAxis.drawAxisLineEnabled = false rightAxis.drawGridLinesEnabled = false rightAxis.drawZeroLineEnabled = true let yAxis = barChartView.leftAxis yAxis.enabled = false yAxis.axisMinimum = axisMinimum yAxis.spaceBottom = 0.0 yAxis.drawAxisLineEnabled = true yAxis.drawGridLinesEnabled = true yAxis.drawZeroLineEnabled = true let xAxis = barChartView.xAxis xAxis.drawLabelsEnabled = true xAxis.drawAxisLineEnabled = true xAxis.drawGridLinesEnabled = true xAxis.labelTextColor = .white xAxis.granularity = 1.0 xAxis.centerAxisLabelsEnabled = true xAxis.axisMinimum = axisMinimum xAxis.axisMaximum = axisMaximum xAxis.labelPosition = .top let legend = barChartView.legend legend.enabled = false var dataEntries: [BarChartDataEntry] = [] for i in 0..<dataPoints.count { let dataEntry = BarChartDataEntry(x: Double(i), y: Double(values[i]), data: dataPoints as AnyObject?) dataEntries.append(dataEntry) } let chartDataSet = BarChartDataSet(values: dataEntries, label: nil) let chartData = BarChartData(dataSet: chartDataSet) chartData.setValueTextColor(NSUIColor.clear) barChartView.xAxis.valueFormatter = IndexAxisValueFormatter(values: dataPoints) barChartView.drawBordersEnabled = false barChartView.data = chartData var colors: [UIColor] = [] colors = [zeroColor, firstColor, secondColor] chartDataSet.colors = colors chartData.barWidth = 1 }
thank for your help
The text was updated successfully, but these errors were encountered:
try yAxis.axisMinimum = 0 and if not work, post an image with y axis label enabled so we see where is 0.
yAxis.axisMinimum = 0
Sorry, something went wrong.
No branches or pull requests
anyone can help me?
I try several time to solve the problem
<img width="132" alt="screen shot 2560-10-30 at 21 11 09" src="https://user-
this is my code
func setChart(dataPoints: [String], values: [Double]) {
barChartView.delegate = self
barChartView.chartDescription?.enabled = false
barChartView.highlightPerTapEnabled = false
barChartView.drawValueAboveBarEnabled = false
barChartView.fitBars = true
barChartView.drawBarShadowEnabled = false
barChartView.drawGridBackgroundEnabled = false
barChartView.pinchZoomEnabled = false
barChartView.doubleTapToZoomEnabled = false
// barChartView.autoScaleMinMaxEnabled = true
// barChartView.scaleYEnabled = false
// barChartView.scaleXEnabled = false
barChartView.animate(xAxisDuration: 0.5, yAxisDuration: 0.5, easingOption: .easeInBounce)
thank for your help
The text was updated successfully, but these errors were encountered: