Browser Stats Data can be pushed from anywhere such as JSF backing beans, CDI Events, JMS and more. In this example a servlet filter keeps track of browser stats of visitors to this page and when a new user makes a request to view this page, stats data is pushed from filter and chart component to visualize the stats is updated real-time.
    <p:chart type="pie" widgetVar="browserChart" model="#{browserStatsView.pieModel}" style="width:400px;height:300px"  />

    <p:socket onMessage="handleMessage" channel="/browser" />

<script type="text/javascript">
    function handleMessage(data) {
        var series = [],
        chart = PF('browserChart').plot;

        for(var key in data) {
            series.push([key, data[key]]);

        chart.series[0].data = series;
PrimeTek, Copyright © 2017
All rights reserved.
Running PrimeFaces-6.2-SNAPSHOT on Mojarra-2.3.2.