Fixed Array Size Bug
This commit is contained in:
@@ -114,8 +114,8 @@ public class AirlineGraphController extends Controller{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
int length = 10;
|
int length = 10;
|
||||||
if (airlinesFiltered.length < 10){
|
if (countries.size() < 10){
|
||||||
length = airlinesFiltered.length;
|
length = countries.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0 ; i < length; i ++) {
|
for (int i = 0 ; i < length; i ++) {
|
||||||
@@ -130,7 +130,6 @@ public class AirlineGraphController extends Controller{
|
|||||||
series.getData().add(new XYChart.Data<String, Integer>(maxCountry, max));
|
series.getData().add(new XYChart.Data<String, Integer>(maxCountry, max));
|
||||||
countries.remove(maxCountry);
|
countries.remove(maxCountry);
|
||||||
}
|
}
|
||||||
System.out.println(countries.size());
|
|
||||||
countryGraph.getData().add(series);
|
countryGraph.getData().add(series);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user