I am using Charts API and implementing chart. I am new in that and there is no proper documentation for Swift 3.
I tried and implemented but don't know how to remove that negative scale for y. How can I start my graph from 0 only, so it does not show a negative y scale?
Below is my code:
fileprivate func ChartViewProperty() {
barChartView.xAxis.labelPosition = .bottom
barChartView.chartDescription?.text = ""
barChartView.fitBars = true
barChartView.pinchZoomEnabled = false
self.barChartView.rightAxis.enabled = false
barChartView.animate(xAxisDuration: 2.0, yAxisDuration: 2.0)
barChartView.animate(xAxisDuration: 2.0, yAxisDuration: 2.0, easingOption: .easeInBounce)
barChartView.xAxis.valueFormatter = IndexAxisValueFormatter(values:months)
barChartView.xAxis.granularity = 1
value.append([jan,feb,mar,apr,may,jun,jly,aug,sep,oct,nov,dec])
setChart(dataPoints: months, values: value)
}.
Image: