First thing to know is that if you let GraphView manage the Y-scale, it will display 10 intervals, ie 11 values. So, if you have values from 0 to 10, or 0 to 20, displayed values will be integers.
You can manually set vertical bounds with GraphView.setManualYAxisBounds(double max, double min) In you case, you would want to use setManualYAxisBounds(5, 0), but you wouldn't have integers displayed. So you must use getGraphViewStyle().setNumVerticalLabels(6)
Here's a piece of code I use to dynamically adapt scale with values from 0 to 200, with a max scale value as close as possible from the max value of my data (I hope I'm understandable, lol)
int maxValue = ... // here, you find your max value
// search the interval between 2 vertical labels
int interval;
if (maxValue <= 55) {
interval = 5; // increment of 5 between each label
} else if (maxValue <= 110) {
interval = 10; // increment of 10 between each label
} else {
interval = 20; // increment of 20 between each label
}
// search the top value of your graph, it must be a multiplier of your interval
int maxLabel = maxValue;
while (maxLabel % interval != 0) {
maxLabel++;
}
// set manual bounds
setManualYAxisBounds(maxLabel, 0);
// indicate number of vertical labels
getGraphViewStyle().setNumVerticalLabels(maxLabel / interval + 1);
// now, it's ok, you should have a graph with integer labels