How to hide labels in ios-charts?

前端 未结 3 1916
伪装坚强ぢ
伪装坚强ぢ 2020-12-15 16:34

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. H

相关标签:
3条回答
  • 2020-12-15 16:59
    self.chartView.xAxis.drawGridLinesEnabled = false
    self.chartView.leftAxis.drawLabelsEnabled = false
    self.chartView.legend.enabled = false
    

    will do the job

    0 讨论(0)
  • 2020-12-15 17:21
    self.chartView.drawEntryLabelsEnabled = false
    

    This will hide the label from PieChart and shows only value. Also shows legend with label texts.

    0 讨论(0)
  • 2020-12-15 17:26

    For only hide the top one:

    graphCell.lineChartView.leftAxis.drawTopYLabelEntryEnabled = false
    
    0 讨论(0)
提交回复
热议问题