Package org.primefaces.model.chart

Examples of org.primefaces.model.chart.MeterGaugeChartModel


public class MeterGaugeRenderer extends BasePlotRenderer {

    @Override
    protected void encodeData(FacesContext context, Chart chart) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        MeterGaugeChartModel model = (MeterGaugeChartModel) chart.getModel();
       
        writer.write(",data:[[" + model.getValue() + "]]");
    }
View Full Code Here


    @Override
    protected void encodeOptions(FacesContext context, Chart chart) throws IOException {
        super.encodeOptions(context, chart);
       
        ResponseWriter writer = context.getResponseWriter();
        MeterGaugeChartModel model = (MeterGaugeChartModel) chart.getModel();
        String gaugeLabel = model.getGaugeLabel();
        double min = model.getMin();
        double max = model.getMax();
        Integer intervalInnerRadius = model.getIntervalInnerRadius();
        Integer intervalOuterRadius = model.getIntervalOuterRadius();
       
        encodeNumberList(context, "intervals", model.getIntervals());
        encodeNumberList(context, "ticks", model.getTicks());

        if(gaugeLabel != null) {
            writer.write(",gaugeLabel:\"" + gaugeLabel + "\"");
            writer.write(",gaugeLabelPosition:\"" + model.getGaugeLabelPosition() + "\"");
        }
             
        writer.write(",showTickLabels:" + model.isShowTickLabels());
        writer.write(",labelHeightAdjust:" + model.getLabelHeightAdjust());
       
        if(intervalInnerRadius != null) writer.write(",intervalInnerRadius:" + intervalInnerRadius);
        if(intervalOuterRadius != null) writer.write(",intervalOuterRadius:" + intervalOuterRadius);
       
        if(min != Double.MIN_VALUE) writer.write(",min:" + min);
View Full Code Here

    }

    
    protected void encodeOptions(FacesContext context, MeterGaugeChart chart) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        MeterGaugeChartModel model = (MeterGaugeChartModel)chart.getValue();
       
        writer.write("data:[[" + model.getValue() + "]]");
       
        encodeCommonConfig(context, chart);
       
        writer.write(", seriesDefaults : { renderer: $.jqplot.MeterGaugeRenderer, rendererOptions : {");
       
        writer.write("intervals:" + model.getIntervals().toString());
       
        writer.write(",label:'" + model.getLabel() + "'");
       
        if(!chart.isShowTickLabels())
            writer.write(",showTickLabels:false");
       
        writer.write(",labelHeightAdjust:" + chart.getLabelHeightAdjust());
View Full Code Here

            add(20000);
            add(30000);
            add(50000);
            add(70000);
        }};
        model = new MeterGaugeChartModel(52200, intervals, ticks);
    }
View Full Code Here

        endScript(writer);
    }
   
    protected void encodeData(FacesContext context, MeterGaugeChart chart) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        MeterGaugeChartModel model = (MeterGaugeChartModel) chart.getValue();
       
         writer.write(",data:[[" + model.getValue() + "]]");
    }
View Full Code Here

    protected void encodeOptions(FacesContext context, MeterGaugeChart chart) throws IOException {
        super.encodeOptions(context, chart);
       
        ResponseWriter writer = context.getResponseWriter();
        MeterGaugeChartModel model = (MeterGaugeChartModel)chart.getValue();
        String label = chart.getLabel();
       
        encodeNumberList(context, "intervals", model.getIntervals());
        encodeNumberList(context, "ticks", model.getTicks());

        if(label != null) {
            writer.write(",label:'" + label + "'");
        }
             
View Full Code Here

TOP

Related Classes of org.primefaces.model.chart.MeterGaugeChartModel

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.