Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 486
VladyslavPG Avatar asked Apr 19 '16 09:04

VladyslavPG


2 Answers

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

will do the job

like image 94
keyv Avatar answered Nov 14 '22 11:11

keyv


self.chartView.drawEntryLabelsEnabled = false

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

like image 29
Ares Avatar answered Nov 14 '22 11:11

Ares