I am using charts framework for drawing charts. I need to add some strings in left of every bars. In my code always there are two bars, one for Income and o
self.ChartObj.xAxis.valueFormatter = DefaultAxisValueFormatter(block: {(index, _) in print(index) return YourArray.object(at: Int(index)) as! String }) self.ChartObj.xAxis.setLabelCount(YourArray.count, force: true)
Try this code