Sourav Singh
Sourav Singh

Reputation: 95

MPAndroidChart: How to show limit lines without showing the Y Axis?

I have tried doing

getAxisLeft().setEnabled(false);

But with this line of code, the limit lines also disappear. what's the solution for this?

Something like this!

Upvotes: 1

Views: 1169

Answers (1)

Kasım Özdemir
Kasım Özdemir

Reputation: 5634

YAxis left = mChart.getAxisLeft();
left.setDrawLabels(false); // no axis labels
left.setDrawAxisLine(false); // no axis line
left.setDrawGridLines(false); // no grid lines
left.setDrawZeroLine(true); // draw a zero line
mChart.getAxisRight().setEnabled(false); // no right axis

Maybe you can use like this:

YAxis left = mChart.getAxisLeft();
left.setDrawLabels(false);
left.setDrawAxisLine(true); 

Upvotes: 2

Related Questions