1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

bugfix issue #91 - defined yAxis.rangeValues in case of no range in

analysis.toolbox.AlgorithmSearchProgressChartListener.java
This commit is contained in:
oblonski 2014-04-10 10:10:09 +02:00
parent 03dc5dd3ff
commit 1b01f141ce

View file

@ -124,7 +124,13 @@ public class AlgorithmSearchProgressChartListener implements IterationEndsListen
Range rangeBounds = coll.getRangeBounds(true);
double upper = Math.min(rangeBounds.getUpperBound(), rangeBounds.getLowerBound()*5);
if(upper == 0.0){ upper = 10000; }
yAxis.setRangeWithMargins(rangeBounds.getLowerBound(),upper);
if(rangeBounds.getLowerBound() == upper){
yAxis.setRangeWithMargins(rangeBounds.getLowerBound()-rangeBounds.getLowerBound()*.1,upper+upper*.1);
}
else{
yAxis.setRangeWithMargins(rangeBounds.getLowerBound(),upper);
}
try {
ChartUtilities.saveChartAsJPEG(new File(filename), chart, 1000, 600);