MPAndroidChart BarChart disable right legends
Add this line
rightAxis.setDrawLabels(false);
To hide only the labels.
For hiding the whole right axis, call:
rightAxis.setEnabled(false);
For those using Kotlin lang:
chart.axisRight.isEnabled = false
Hope it helps!
A simple one liner:
chart.getAxisRight().setEnabled(false);