Package at.reppeitsolutions.formbuilder.components.helper

Examples of at.reppeitsolutions.formbuilder.components.helper.FormDataPieChartResult


    @Override
    public void encodeBegin(FacesContext ctx, UIComponent component) throws IOException {
        ResponseWriter writer = ctx.getResponseWriter();
        FormDataResultPieChart pieChartComponent = (FormDataResultPieChart) component;
        FormDataPieChartResult pieChart = pieChartComponent.getPieChart();
        if (pieChart != null && pieChart.getValues() != null && !pieChart.getValues().isEmpty()) {
            String pieChartId = "pieChart" + UUID.randomUUID().toString();
            String json = "[";
            for (Map.Entry pairs : pieChart.getValues().entrySet()) {
                json += "{label:\"" + pairs.getKey() + "\",data:" + pairs.getValue() + "},";
            }
            json += "]";
            writer.write("\n<!--" + json + "-->\n");
            writer.write("<style>"
View Full Code Here

TOP

Related Classes of at.reppeitsolutions.formbuilder.components.helper.FormDataPieChartResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.