Charts - Interactive

When a dataset data is clicked, information can be passed to a backing bean using itemSelect ajax behavior.

<h:form>
    <p:growl id="growl" showDetail="true" />
    
    <p:barChart model="#{chartJsView.barModel2}" style="width: 100%; height: 500px;">
        <p:ajax event="itemSelect" listener="#{chartJsView.itemSelect}" update="growl"/>
    </p:barChart>
</h:form>