Hello, if i need to clear dots in chart for a while (in case of dynamic charts building via XYSeriesBuilder with empty items and calling clear()on items causes
Exception in thread "JavaFX Application Thread" java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
at java.base/java.util.Objects.checkIndex(Objects.java:372)
at java.base/java.util.ArrayList.get(ArrayList.java:459)
at javafx.base/com.sun.javafx.collections.ObservableListWrapper.get(ObservableListWrapper.java:89)
at eu.hansolo.fx.charts.XYPane.drawLine(XYPane.java:717)
at eu.hansolo.fx.charts.XYPane.drawChart(XYPane.java:675)
at eu.hansolo.fx.charts.XYPane.redraw(XYPane.java:636)
at eu.hansolo.fx.charts.XYPane.lambda$registerListeners$8(XYPane.java:229)
at eu.hansolo.fx.charts.series.Series.fireSeriesEvent(Series.java:467)
at eu.hansolo.fx.charts.series.Series.lambda$new$0(Series.java:134)
at javafx.base/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
at javafx.base/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
at javafx.base/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
at javafx.base/javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
at javafx.base/javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
at javafx.base/javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205)
at javafx.base/com.sun.javafx.collections.ObservableListWrapper.clear(ObservableListWrapper.java:157)
Hello, if i need to clear dots in chart for a while (in case of dynamic charts building via
XYSeriesBuilder
with empty items and callingclear()
on items causesis that normal?