There is no error but there is an issue with the plot am not getting the correct line chart plot, I want parameters in the x-axis and values in the y-axis but I have 3 engines a
Change the generateChart
of performance
class
public void generateChart() {
for (int i = 0; i < engines.size(); i++) {
XYChart.Series series = new XYChart.Series();
series.setName(engines.get(i).toString());
for (int j = 0; j < parameters.size(); j++) {
series.getData().add(new XYChart.Data(parameters.get(j).toString(), param.get(i).get(j)));
}
lineChart.getData().add(series);
}
System.out.println(lineChart);
}
And Use the class from the start
method of NewFXMain
class like below and remove the for loop
performance performvalues = new performance(lineChart, parameters, finalValue, engines);
performvalues.generateChart();
Note : Always keep the class name CamelCase