I am trying to display a bar chart using this library with months as the X-label. However, the x labels seem to be duplicating and "bleeding" to the next columns especially when I scroll. How do I fix this?
Code:
let xAxis = barChartView.xAxis
xAxis.drawGridLinesEnabled = false
xAxis.drawLabelsEnabled = true
xAxis.drawAxisLineEnabled = false
xAxis.labelPosition = .bottom
xAxis.enabled = true
xAxis.axisLineColor = white
xAxis.labelTextColor = white
xAxis.decimals = 0
xAxis.granularity = 1
xAxis.granularityEnabled = true
After grabbing data
// indexCounter = # of data points
xAxis.valueFormatter = IndexAxisValueFormatter(values: xAxisLabelValues)
xAxis.setLabelCount(Int(indexCounter), force: true)
notifyDataSetChanged()