fix iob graph axis labels

This commit is contained in:
Milos Kozak 2018-06-26 00:16:26 +02:00
parent 30c6ed3f8b
commit 44cf82abde
2 changed files with 3 additions and 3 deletions

View file

@ -311,7 +311,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
iobGraph.getGridLabelRenderer().setHorizontalLabelsVisible(false); iobGraph.getGridLabelRenderer().setHorizontalLabelsVisible(false);
bgGraph.getGridLabelRenderer().setLabelVerticalWidth(axisWidth); bgGraph.getGridLabelRenderer().setLabelVerticalWidth(axisWidth);
iobGraph.getGridLabelRenderer().setLabelVerticalWidth(axisWidth); iobGraph.getGridLabelRenderer().setLabelVerticalWidth(axisWidth);
iobGraph.getGridLabelRenderer().setNumVerticalLabels(5); iobGraph.getGridLabelRenderer().setNumVerticalLabels(3);
rangeToDisplay = SP.getInt(R.string.key_rangetodisplay, 6); rangeToDisplay = SP.getInt(R.string.key_rangetodisplay, 6);

View file

@ -604,8 +604,8 @@ public class GraphData {
} }
} }
graph.getViewport().setMaxY(maxY); graph.getViewport().setMaxY(Round.ceilTo(maxY, 1d));
graph.getViewport().setMinY(minY); graph.getViewport().setMinY(Round.floorTo(minY, 1d));
graph.getViewport().setYAxisBoundsManual(true); graph.getViewport().setYAxisBoundsManual(true);
// draw it // draw it