Search code examples
swiftios-charts

How to hide labels in ios-charts?


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

enter image description here


Solution

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

    will do the job