Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How hide MPAndroidChart left and right border?

This is my code

    mLineChart.setDrawBorders(false);
    mLineChart.setBorderWidth(0);

i try use setDrawBorders(false),but left and right have gray thin line,

how hide this line?

enter image description here

like image 689
aniuyihao Avatar asked May 11 '26 14:05

aniuyihao


1 Answers

Try adding :

mLineChart.getAxisLeft().setDrawAxisLine(false); mLineChart.getAxisRight().setDrawAxisLine(false);

You can also check if this axis draw enabled or not by :

mLineChart.getAxisLeft().isDrawAxisLineEnabled(); mLineChart.getAxisRight().isDrawAxisLineEnabled();

like image 115
Sonu Sanjeev Avatar answered May 14 '26 05:05

Sonu Sanjeev