arya-blue
luna-amber
luna-blue
luna-green
luna-pink
nova-dark
nova-light
saga-blue
vela-blue
EChart
Apache ECharts can be exported to PNG, JPG, or SVG as well as printed.
Source

                <script>
        //<![CDATA[
        function exportChart() {
            //export image
            $('#output').empty().append(PF('exportEChart').exportAsImage());

            //show the dialog
            PF('dlg').show();
        };

        //]]>
    </script>

    <pe:echart style="width: 50vw; height: 400px;"  id="echart" widgetVar="exportEChart" value="#{eChartController.json}">
        <p:ajax event="itemSelect" listener="#{eChartController.itemSelect}" />
    </pe:echart>

    <p:commandButton type="button" value="Export" icon="pi pi-home" onclick="exportChart()" styleClass="mr-2 mb-2"/>
    <p:commandButton type="button" value="Print"  icon="pi pi-print" onclick="PF('exportEChart').print()" styleClass="mr-2 mb-2"/>

    <p:dialog widgetVar="dlg" showEffect="fade" modal="true" header="Chart as an Image" resizable="false">
        <p:outputPanel id="output" layout="block" style="width: 50vw; height: 400px;"/>
    </p:dialog>
            
Components and more
Documentation pe:echart
Attributes (move mouse over the names to see data types)
Name Description
bindingAn EL expression referring to a server side UIComponent instance in a backing bean.Default is generated.
extenderName of javascript function to extend the options of the underlying EChart plugin.
idUnique identifier of the component in a namingContainer.Default is generated.
renderedBoolean value to specify the rendering of the component, when set to false component will not be rendered.Default is true.
styleInline style of the component.
styleClassStyle class of the component.
themeThe theme to style the chart with. Can be a theme name imported in JS or 'light' or 'dark'.Default is default.
valueJSON value of the chart.
widgetVarName of the client side widget.
PrimeFaces Extensions Showcase - © 2011-2025,PrimeFaces: 16.0.0-SNAPSHOT,PrimeFaces Extensions: 16.0.0-SNAPSHOT,JSF: Apache MyFaces Core 4.0 - Impl 4.0.3,Server: Apache Tomcat (TomEE)/10.1.52 (10.1.4),Build time: 2026-03-05 23:14