I'm making an XY line chart, and am getting and Unchecked call warning when I add a data point
XYChart.Series series = new XYChart.Series();
series.setName("Temp Res graph");
for(int i = 1; i<800; i++) {
XYChart.Data dp = new XChart.Data(i,Integer.parseInt(getTemp(i)));
series.getData().add(dp);
lineChart.getData().add(series);
}
Its a warning, but when I run the code I get a bunch of errors, that seem to be caused by those lines:
Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: Duplicate series added