I have the following problem when using any JavaFX Chart: I dynamically add data to the chart and only the last X-Axis label shows up.
I already noticed that the chart is displayed fine when animations are disabled.
XYChart.Series<String,Double> series1= new Series<String, Double>();
series1.setName(scenario1.getName());
XYChart.Series<String,Double> series2= new Series<String, Double>();
series2.setName(scenario2.getName());
for(int period = 0; period < config1.getPeriods(); period++){
series1.getData().add(new Data<String, Double>("Period "+(period+1), rmList1.get(0).getCashflowsPerPeriod(config1)[period]));
System.out.println("Series1: "+rmList1.get(0).getCashflowsPerPeriod(config1)[period]);
}
for(int period = 0; period < config2.getPeriods(); period++){
series2.getData().add(new Data<String, Double>("Period "+(period+1), rmList2.get(0).getCashflowsPerPeriod(config2)[period]));
System.out.println("Series2: "+rmList2.get(0).getCashflowsPerPeriod(config2)[period]);
}
sacCashflows.getData().addAll(series1,series2);