VladyslavPG
VladyslavPG

Reputation: 577

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

Upvotes: 37

Views: 20356

Answers (3)

Santiago
Santiago

Reputation: 598

For only hide the top one:

graphCell.lineChartView.leftAxis.drawTopYLabelEntryEnabled = false

Upvotes: 0

Yugene
Yugene

Reputation: 3232

self.chartView.drawEntryLabelsEnabled = false

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

Upvotes: 4

keyv
keyv

Reputation: 2470

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

will do the job

Upvotes: 112

Related Questions