title: Error while generating Primefaces Pie Chart
body: <p>I am trying to generate a Pie Chart using PrimeFaces (V8.0 / 7.0). And below is the demo code. 
  <strong>NOTE</strong>- I am running this Demo on Glassfish5</p>
  
  <pre><code>import javax.annotation.PostConstruct;
  import javax.inject.Named;
  import org.primefaces.model.chart.PieChartModel;
  
  @Named
  public class PieDemoMBean {
  
      private PieChartModel model;
  
      @PostConstruct
      public void init(){
          model=new PieChartModel();
          model.set("Red", 25);
          model.set("Green", 25);
          model.set("Blue", 25);
          model.set("Black", 25);
          model.setShowDataLabels(true);
      }
  
      public PieChartModel getModel() {
          return model;
      }
  
  }
  </code></pre>
  
  <p>and JSF Page</p>
  
  <pre><code>&lt;html xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                  xmlns:h="http://xmlns.jcp.org/jsf/html"
                  xmlns:p="http://primefaces.org/ui"&gt;
      &lt;h:head&gt;
          &lt;title&gt;Facelet Title&lt;/title&gt;
      &lt;/h:head&gt;
      &lt;h:body&gt;
          &lt;h1&gt;Pi Chart Demo&lt;/h1&gt;
          &lt;div&gt;
              &lt;p:chart type="pie" responsive="true" model="#{pieDemoMBean.model}"/&gt;
  
          &lt;/div&gt;
  
      &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And finally here is the error log</p>
  
  <pre><code>Error Rendering View[/PiDemo.xhtml]
  java.lang.NullPointerException
      at org.primefaces.component.chart.renderer.PieRenderer.encodeData(PieRenderer.java:43)
      at org.primefaces.component.chart.renderer.BasePlotRenderer.render(BasePlotRenderer.java:38)
  </code></pre>
  
  <p>Please advise.</p>