How to hide labels in ios-charts?

2019-01-24 01:40发布

问题:

I need disable some elements from my chart.

I used the iOS-charts library in (Swift 2), however I can't understand how to disable the following:

  1. Hide right and left numbers

  2. Hide description color square

  3. Hide all vertical lines

回答1:

self.chartView.xAxis.drawGridLinesEnabled = false
self.chartView.leftAxis.drawLabelsEnabled = false
self.chartView.legend.enabled = false

will do the job