I have a line graph that I add data to each time the user enters a number. The user enters a number 50 times, so I want the x axis to range from 1 to 50 in increments of 1. On the y axis, I want it to range from 2 - 15 (user enters a number between 2 and 15) in increments of 1. I'm really not sure how to do this, this is what I have:
graph = (GraphView) findViewById(R.id.session_graph);
series = new LineGraphSeries<DataPoint>(new DataPoint[] {});
graph.addSeries(series);
graph.getViewport().setMinX(1);
graph.getViewport().setMaxX(50);
graph.getViewport().setMinY(2.0);
graph.getViewport().setMaxY(15.0);
However, when I fire up my app, the x and y axis range from 0 - 2 in intervals of 0.5