aniuyihao
aniuyihao

Reputation: 33

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

Upvotes: 3

Views: 1098

Answers (2)

Sonu Sanjeev
Sonu Sanjeev

Reputation: 952

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();

Upvotes: 4

Muhammad Saad Rafique
Muhammad Saad Rafique

Reputation: 3189

To remove left line you need to add:

mLineChart.getAxisLeft().setEnabled(false);

To remove right line you need to add:

mLineChart.getAxisRight().setEnabled(false);

Upvotes: 0

Related Questions