fix ratio scale

This commit is contained in:
Milos Kozak 2018-07-24 11:01:33 +02:00
parent 503d61e1be
commit 9fc54f4e0c

View file

@ -611,8 +611,10 @@ public class GraphData {
} }
} }
graph.getViewport().setMaxY(Round.ceilTo(maxY, 1d)); double step = 1d;
graph.getViewport().setMinY(Round.floorTo(minY, 1d)); if (maxY < 1) step = 0.1d;
graph.getViewport().setMaxY(Round.ceilTo(maxY, step));
graph.getViewport().setMinY(Round.floorTo(minY, step));
graph.getViewport().setYAxisBoundsManual(true); graph.getViewport().setYAxisBoundsManual(true);
// draw it // draw it