Locale

Language
English
English
English
French
German
German
Italian
Korean
Spanish
Catalan
Dutch
Portuguese
Portuguese
Arabic
Arabic
Bulgarian
Czech
Greek
Persian
Finnish
Danish
Hindi
Indonesian
Croatian
Japanese
Hungarian
Hebrew
Georgian
Central Kurdish
Khmer
Kyrgyz
Kazakh
Lithuanian
Latvian
Malay
Norwegian
Polish
Romanian
Russian
Slovak
Slovenian
Serbian
Swedish
Thai
Turkish
Ukrainian
Vietnamese
Chinese
Chinese

Input Style

Free Themes

Built-in component themes created by the PrimeFaces Theme Designer.

Saga Saga
Vela Vela
Arya Arya

Legacy Free Themes

Luna Amber Luna Amber
Luna Blue Luna Blue
Luna Green Luna Green
Luna Pink Luna Pink
Nova Nova
Nova Nova Alt
Nova Nova Accent

Charts Pie

PieChart is created with raw JSON or using an XDEV model. Using the extender functionality to add Data Labels to the pie chart with the Data Labels plugin.


<!-- Must load plugin JS (here using OmniFaces CDN handler) -->
<h:outputScript library="cdn" name="chartjs-plugin-datalabels.js" target="body"/>
<script>
    function chartExtender() {
        var options = {
            plugins: [ChartDataLabels],
            options: {
                plugins: {
                    // Change options for ALL labels of THIS CHART
                    datalabels: {
                        color: 'HotPink'
                    }
                }
            },
            data: {
                datasets: [{
                    // Change options only for labels of THIS DATASET
                    datalabels: {
                        color: 'Indigo'
                    }
                }]
            }
        };

        //merge all options into the main chart options
        $.extend(true, this.cfg.config, options);
    }
</script>

<div class="grid">
    <div class="col-12 lg:col-6 xl:col-4">
        <div class="card">
            <p:chart value="#{chartView.pieModel}" extender="chartExtender"/>
        </div>
    </div>
</div>