Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8297010

LineChart with error Duplicate Series Added when chart series is changed and animation set TRUE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx11, jfx20, jfx17, jfx19
    • javafx
    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      Any System, JavaFX 20-ea+6

      A DESCRIPTION OF THE PROBLEM :
      It is a common issue: https://stackoverflow.com/questions/32151435/javafx-duplicate-series-added

      If you try to change the chart series when animation is on, you get this error

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Create a LineChart with multiple series
      2. remove some series and re-add them

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      1. Nothing really, unless the series you added are different in which case the chart would change
      ACTUAL -
      e=java.lang.IllegalArgumentException: Duplicate series added
      stacktrace(len=14):
      javafx.scene.chart.XYChart.lambda$new$1(XYChart.java:135)
      com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
      com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
      javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:239)
      javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
      javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
      javafx.collections.ObservableListBase.endChange(ObservableListBase.java:211)
      javafx.collections.ModifiableObservableListBase.add(ModifiableObservableListBase.java:162)
      java.base/java.util.AbstractList.add(AbstractList.java:111)

      CUSTOMER SUBMITTED WORKAROUND :
      Turn animation off

      FREQUENCY : always


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: