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

addSeriesAsDrilldown cause NPE if triggered before manual charts drilldown

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 10.2.1.0
    • 7.2.2.0
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      Run attached sample.

       

      Current Result

      Click button > cause NPE

      Click chart's drillable serie, click back to button to return to root

      Click button > chart drilldown as expected

      Expected Result

      addSeriesAsDrilldown doesn't cause NPE

      Debug Information

      Charts internal org.zkoss.chart.Charts._drilldownLevels list is null until initialized in org.zkoss.chart.Charts.service(AuRequest, boolean)

      in the org.zkoss.chart.ChartsEvents.ON_PLOT_DRILL_DOWN section.

      If the chart has not triggered org.zkoss.chart.ChartsEvents.ON_PLOT_DRILL_DOWN at least one time, calling addSeriesAsDrilldown causes a NPE instead.

      Workaround

       

        1. chart-bug.zul
          0.2 kB
          MDuchemin
        2. DrilldownBugComposer.java
          1 kB
          MDuchemin

            jumperchen jumperchen
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: