run attached code, click on chart. Next NPE will be thrown:
java.lang.NullPointerException
at javafx.scene.chart.AreaChart.dataItemRemoved(AreaChart.java:151)
at javafx.scene.chart.XYChart.dataItemsChanged(XYChart.java:448)
at javafx.scene.chart.XYChart.access$2500(XYChart.java:51)
at javafx.scene.chart.XYChart$Series$1.onChanged(XYChart.java:1430)
at com.sun.javafx.collections.ObservableListWrapper.callObservers(ObservableListWrapper.java:98)
at com.sun.javafx.collections.ObservableListWrapper.remove(ObservableListWrapper.java:205)
at controls.AdvancedAreaChartSample$1.handle(AdvancedAreaChartSample.java:71)
[...]
java.lang.NullPointerException
at javafx.scene.chart.AreaChart.dataItemRemoved(AreaChart.java:151)
at javafx.scene.chart.XYChart.dataItemsChanged(XYChart.java:448)
at javafx.scene.chart.XYChart.access$2500(XYChart.java:51)
at javafx.scene.chart.XYChart$Series$1.onChanged(XYChart.java:1430)
at com.sun.javafx.collections.ObservableListWrapper.callObservers(ObservableListWrapper.java:98)
at com.sun.javafx.collections.ObservableListWrapper.remove(ObservableListWrapper.java:205)
at controls.AdvancedAreaChartSample$1.handle(AdvancedAreaChartSample.java:71)
[...]