Uploaded image for project: 'ZK Charts'
  1. ZK Charts
  2. ZKCHARTS-3

clearing a chart model causes an IndexOutOfBoundsException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • 1.0.0-BETA
    • Security Level: Jimmy

      the example shows a stacked area chart with dynamic content updated in 2 ways

      1 replace the whole model with a new one "replace model"
      2 clear the existing model and fill with new data "update same model"

      both operations fail
      1 possibly a duplicate of ZKCHARTS-2
      2 causes an IndexOutOfBoundsException in SimpleCategoryModel::clear()

      SEVERE:
      java.lang.IndexOutOfBoundsException: Index: -1, Size: 2
      at java.util.LinkedList.entry(LinkedList.java:365)
      at java.util.LinkedList.get(LinkedList.java:315)
      at org.zkoss.chart.PlotData.getSeries(PlotData.java:341)
      at org.zkoss.chart.Charts.getSeries(Charts.java:1819)
      at org.zkoss.chart.Charts$MyChartDataListener.onChange(Charts.java:472)
      at org.zkoss.zul.AbstractChartModel.fireEvent(AbstractChartModel.java:55)
      at org.zkoss.zul.SimpleCategoryModel.clear(SimpleCategoryModel.java:157)
      ...

            Jenkins Jenkins
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: