fix ratio scale #2
This commit is contained in:
parent
9fc54f4e0c
commit
026c9f4788
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue