Uploaded image for project: 'ZK Spreadsheet'
  1. ZK Spreadsheet
  2. ZSS-524

After change chart font library setting, the chart without title throws NPE.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 3.0.1
    • 3.0.0, 3.0.1
    • ZSS App
    • None

      I want to display chart with Chinese, so I change library setting in the run time.

      org.zkoss.lang.Library.setProperty("org.zkoss.zss.chart.title.font", "SansSerif, Italic, 30");
      org.zkoss.lang.Library.setProperty("org.zkoss.zss.chart.legend.font", "SansSerif, plain, 18");
      org.zkoss.lang.Library.setProperty("org.zkoss.zss.chart.xAxisTick.font", "SansSerif, bold, 16");
      org.zkoss.lang.Library.setProperty("org.zkoss.zss.chart.xAxis.font", "SansSerif, bold, 18");
      

      After I set above property, if there exist a chart without title throws NPE:

      嚴重的: >>java.lang.NullPointerException
      >> at org.zkoss.zkex.zul.impl.JFreeChartEngine.drawChart(JFreeChartEngine.java:364)
      >> at org.zkoss.zul.Chart.doSmartDraw(Chart.java:243)
      >> at org.zkoss.zul.Chart.access$100(Chart.java:82)
      >> at org.zkoss.zul.Chart$SmartDrawListener.onEvent(Chart.java:224)
      >> at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2743)
      >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2714)
      >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2655)
      >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136)
      >> at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1720)
      >> at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1505)
      >> at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:467)
      >> at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:312)
      >> at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:215)
      >> at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:136)
      >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
      >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      >> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      >> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
      >> at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      >> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      >> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
      >> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
      >> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      >> at org.mortbay.jetty.Server.handle(Server.java:326)
      >> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      >> at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
      >> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
      >> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
      >> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      >> at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
      >> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

      You can use chart-issue.xlsx to reproduce this issue, by using the library setting code above.

            hawk hawk
            roliroli roliroli
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: