It wiil be great also to put margin there.
I am attaching also 2 sc .
Find the minValue and maxValue then the set the axisMin and axisMax values.
//use getAxisRight for right Y axis
YAxis leftAxis = lineChart.getAxisLeft();
leftAxis.setAxisMinimum(minValue);
//above line would be the same except
//"1" should be calculated and not hard coded
leftAxis.setAxisMaximum(maxValue - 1);