Charts - Live Data

This example displays an ongoing election between two candidates. Votes are updated live and displayed on a pie chart.

Source

<h:form id="form">

    <p:poll interval="3" update="votes" />

    <p:pieChart id="votes" value="#{chartBean.livePieModel}" title="Live Chart"
                legendPosition="nw" style="width:400px;height:300px"/>

</h:form>