fix ratio scale #2

This commit is contained in:
Milos Kozak 2018-07-24 12:00:16 +02:00
parent 9fc54f4e0c
commit 026c9f4788

View file

@ -511,11 +511,11 @@ public class GraphData {
ratioSeries.setThickness(3); ratioSeries.setThickness(3);
if (useForScale) { if (useForScale) {
maxY = maxRatioValueFound; maxY = Math.max(maxRatioValueFound, Math.abs(minRatioValueFound));
minY = minRatioValueFound; minY = -maxY;
} }
ratioScale.setMultiplier(maxY * scale / maxRatioValueFound); ratioScale.setMultiplier(maxY * scale / Math.max(maxRatioValueFound, Math.abs(minRatioValueFound)));
addSeries(ratioSeries); addSeries(ratioSeries);
} }