I know the method for removing the x-values but how do I remove the y-values. I basically don't want ANY text on my Pie Chart.
The image shows the current-state with the 80.0 and 20.0 labels on top of the pie chart.
I know the method for removing the x-values but how do I remove the y-values. I basically don't want ANY text on my Pie Chart.
The image shows the current-state with the 80.0 and 20.0 labels on top of the pie chart.
To remove the Y-Values
Use dataset.setDrawValues(false);
To remove the X-Values
Use MyPieChart.setDrawSliceText(false);
For Charts Version 3.2.1
Both X - Y values enabled
pieChartDataSet.drawValuesEnabled = true
pieChartView.drawEntryLabelsEnabled = true
To remove the Y-Values
pieChartDataSet.drawValuesEnabled = false
To remove the X-Values
pieChartView.drawEntryLabelsEnabled = false
Never mind figured it out!
pieChartView.data?.setValueTextColor(UIColor.clearColor())
That at least gets it from not seeing those labels.
Also another way is setting this to false:
drawLabelsEnabled
To remove the labels (xVals):
pieChartView.drawSliceTextEnabled = false
To remove the values (yVals):
pieChartDataSet.drawValuesEnabled = false
drawLabelsEnabled
will not draw any label on your chart. It is for both xAxis and yAxis
checkout for all the basic configurations: https://github.com/danielgindi/ios-charts/blob/master/Charts/Classes/Components/ChartAxisBase.swift
In ios-charts version 3.1.1, you can hide piechart slice labels by setting pie_chart.drawEntryLabelsEnabled = NO;
Mp Android chart, please use this
To remove x-Values use pieChart.setDrawSliceText(false).
To remove y-Values use pieChart.getData().setDrawValues(false).