Package org.primefaces.model.chart

Examples of org.primefaces.model.chart.BubbleChartModel


public class BubbleRenderer extends CartesianPlotRenderer {

    @Override
    protected void encodeData(FacesContext context, Chart chart) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        BubbleChartModel model = (BubbleChartModel) chart.getModel();
        List<BubbleChartSeries> data = model.getData();

        writer.write(",data:[[");
        for(Iterator<BubbleChartSeries> it = data.iterator(); it.hasNext();) {
            BubbleChartSeries s = it.next();
            writer.write("[");
View Full Code Here


    @Override
    protected void encodeOptions(FacesContext context, Chart chart) throws IOException {
        super.encodeOptions(context, chart);
       
        ResponseWriter writer = context.getResponseWriter();
        BubbleChartModel model = (BubbleChartModel) chart.getModel();
       
        writer.write(",showLabels:" + model.isShowLabels());
        writer.write(",bubbleGradients:" + model.isBubbleGradients());
        writer.write(",bubbleAlpha:" + model.getBubbleAlpha());
       
        if(model.isZoom())
            writer.write(",zoom:true");
       
        if(model.isShowDatatip()) {
            writer.write(",datatip:true");
            if(model.getDatatipFormat() != null)
                writer.write(",datatipFormat:\"" + model.getDatatipFormat() + "\"");
        }
    }
View Full Code Here

    public BubbleChartController() {
        createBubbleChart();
    }

    private void createBubbleChart() {
        model = new BubbleChartModel();

        model.add(new BubbleChartSeries("California", 3576, 170506, 4455));
        model.add(new BubbleChartSeries("Texas", 3248, 296259, 1710));
        model.add(new BubbleChartSeries("Florida", 2496,114422, 3104));
        model.add(new BubbleChartSeries("New York", 1422, 112347, 2885));
View Full Code Here

        endScript(writer);
    }
   
    protected void encodeData(FacesContext context, BubbleChart chart) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        BubbleChartModel model = (BubbleChartModel) chart.getValue();
        List<BubbleChartSeries> data = model.getData();

        writer.write(",data:[[");
        for(Iterator<BubbleChartSeries> it = data.iterator(); it.hasNext();) {
            BubbleChartSeries s = it.next();
            writer.write("[");
View Full Code Here

TOP

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

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.