Reputation: 67
i have been experimenting with the charts framework and things seems to be running as expected except the behavior of the xAxis.granularity setting.
barChartView.xAxis.valueFormatter = IndexAxisValueFormatter(values: ["A","B","C","D","E","F","G","H","I","J","K","L"])
barChartView.xAxis.granularityEnabled = true
barChartView.xAxis.granularity = 1
when i set granularity to 2 or above, i get the expected behavior of xAxis label spread out by the value i specified. (the 3 images are for a granularity of 2,3,4)
but when i set granularity = 1 expecting a label under every barchart, i get this
what am i missing ? or is there another setting to force a label at every point ? thanks
Upvotes: 3
Views: 1342
Reputation: 16180
Try setting
setLabelCount(12, force: true) // replace 12 with your data.count
Upvotes: 4