Steps to Reproduce
run the attached example npeManualDrilldown.zul
click any pie segment to drilldown
Current Result
the drill down visually works,
but throws an exception
17:01:19.104 [qtp1966124444-22] ERROR org.zkoss.zk.ui.impl.UiEngineImpl - java.lang.NullPointerException: null at org.zkoss.chart.Charts.service(Charts.java:2371) at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:791) at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1309) at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:611) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:487) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:495) ...
Expected Result
no exception when using drilldown manually (e.g. when loading drilldown data from a DB on demand)
Debug Info
calling addSeriesAsDrilldown from an onPlotClick listener will trigger a different NPE since charts._drilldownLevels is not initializied
Root Cause
the list Charts.getDrillDown().getSeries() is not initialized
Workaround
initialize manually (e.g. in doAfterCompose)
chart.getDrilldown().setSeries(); //sets an empty drilldown series collection
- relates to
-
ZKCHARTS-81 drilldownLevels on cleaned up when using addSeriesAsDrilldown
- Resolved