Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide x-axis values in Barchart of mpandroidChart

I am using barchart from mpandroidchart library.

I want to hide the x-axis values, but I am not able to hide the values. Please help me through it. I used the following code but it doesn't work.

barChart.getXAxis().removeAllLimitLines();
like image 208
vaibhav Avatar asked Nov 30 '22 00:11

vaibhav


1 Answers

You want to hide only the labels of the axis, call xAxis.setDrawLabels(false)

If you want to hide the whole axis, call xAxis.setEnabled(false)

It's all in the documentation.

like image 67
Philipp Jahoda Avatar answered Dec 09 '22 17:12

Philipp Jahoda