January 2013
Intermediate to advanced
328 pages
7h 14m
English
The pieChart component visualizes category data as a pie chart.
A simple definition for a pie chart with categories of data for displaying hours spent per day is shown as follows:
<p:pieChart value="#{pieChartController.model}" style="height:250px" title="Hours per Day" />The chart will be rendered as follows:

The model that binds to the component should be an instance of org.primefaces.model.chart.PieChartModel. The definition of the model along with the categories is given in the following code snippet:
PieChartModel model = new PieChartModel(); model.set("Work", 11); model.set("Eat", 2); model.set("Commute", ...Read now
Unlock full access