I know a method to remove x values, but how to remove y values. I donβt want ANY text on my pie chart at all.
The image shows the current state with labels 80.0 and 20.0 on top of the pie chart.
Ignore it!
pieChartView.data?.setValueTextColor(UIColor.clearColor())
This, at least, allows you not to see these tags.
Also another way sets the value to false:
drawLabelsEnabled
To remove Y values
Use dataset.setDrawValues(false);
dataset.setDrawValues(false);
To remove X values
Use MyPieChart.setDrawSliceText(false);
MyPieChart.setDrawSliceText(false);
To remove tags (xVals):
pieChartView.drawSliceTextEnabled = false
To remove values ββ(yVals):
pieChartDataSet.drawValuesEnabled = false
drawLabelsEnabled will not draw any label on your chart. This is for both xAxis and yAxis
for all major configurations: https://github.com/danielgindi/ios-charts/blob/master/Charts/Classes/Components/ChartAxisBase.swift
In ios diagrams 2.1.3, dataset.drawValuesEnabled = NO; to hide the Y values.
dataset.drawValuesEnabled = NO;
In ios diagrams version 3.1.1, you can hide the labels of fragments of a pie chart by setting pie_chart.drawEntryLabelsEnabled = NO;
pie_chart.drawEntryLabelsEnabled = NO;
For charts version 3.2.1
pieChartView.drawEntryLabelsEnabled = false