The following method in XYChart.java:
http://hg.openjdk.java.net/openjfx/9-dev/rt/file/9c2e8ff4fa26/modules/controls/src/main/java/javafx/scene/chart/XYChart.java#l910
Copied here for convenience:
/**
* This should be called from seriesRemoved() when you are finished with any animation for deleting the series from
* the chart. It will remove the series from showing up in the Iterator returned by getDisplayedSeriesIterator().
*
* @param series The series to remove
*/
protected final void removeSeriesFromDisplay(Series<X, Y> series) {
if (series != null) series.setToRemove = false;
series.setChart(null);
displayedSeries.remove(series);
}
Seems like it could throw a NullPointerException if the given series argument is null. Perhaps it should actually be:
/**
* This should be called from seriesRemoved() when you are finished with any animation for deleting the series from
* the chart. It will remove the series from showing up in the Iterator returned by getDisplayedSeriesIterator().
*
* @param series The series to remove
*/
protected final void removeSeriesFromDisplay(Series<X, Y> series) {
if (series != null) {
series.setToRemove = false;
series.setChart(null);
}
displayedSeries.remove(series);
}
http://hg.openjdk.java.net/openjfx/9-dev/rt/file/9c2e8ff4fa26/modules/controls/src/main/java/javafx/scene/chart/XYChart.java#l910
Copied here for convenience:
/**
* This should be called from seriesRemoved() when you are finished with any animation for deleting the series from
* the chart. It will remove the series from showing up in the Iterator returned by getDisplayedSeriesIterator().
*
* @param series The series to remove
*/
protected final void removeSeriesFromDisplay(Series<X, Y> series) {
if (series != null) series.setToRemove = false;
series.setChart(null);
displayedSeries.remove(series);
}
Seems like it could throw a NullPointerException if the given series argument is null. Perhaps it should actually be:
/**
* This should be called from seriesRemoved() when you are finished with any animation for deleting the series from
* the chart. It will remove the series from showing up in the Iterator returned by getDisplayedSeriesIterator().
*
* @param series The series to remove
*/
protected final void removeSeriesFromDisplay(Series<X, Y> series) {
if (series != null) {
series.setToRemove = false;
series.setChart(null);
}
displayedSeries.remove(series);
}