title: Primefaces 5.0 Chart Customization
body: <p>I have a problem with creating custom p:chart type="pie" canvases.</p>
  
  <p>I have to change the background color of the pie chart like from white to another color.</p>
  
  <p>I tried almost everything i found. I tried to override css resource of Prime Faces chart classes but it doesn't work. It turns all canvas/frame into one color and make chart disappears.</p>
  
  <p><strong>.xhtml file</strong></p>
  
  <pre><code>&lt;p:chart type="pie"
   model="#{dashboardController.model}"
   style="width:500px;height:250px;  margin: 0 auto;" /&gt;
  </code></pre>
  
  <p><strong>bean.java file</strong></p>
  
  <pre><code>model= new PieChartModel();
  model.setDataFormat("value");
  model.setShowDataLabels(true);
  model.setFill(true);
  model.setTitle("States");
  model.setSeriesColors("62656a,a5a5a5,929397");
  model.setShowDataLabels(true);
  model.setDiameter(200);
  </code></pre>
  
  <p>This is the component which i need to change background of the canvas. You can see the same chart from here : <a href="http://www.primefaces.org/showcase/ui/chart/pie.xhtml" rel="nofollow">http://www.primefaces.org/showcase/ui/chart/pie.xhtml</a></p>
  
  <p>**How can i change only the background? **</p>
  
  <p>Thanks in advance.</p>