Package org.richfaces.sandbox.chart.model

Examples of org.richfaces.sandbox.chart.model.NumberChartDataModel


                   
                    //if series has no data create empty model
                    if(model==null){
                      switch (s.getType()) {
            case line:
              model = new NumberChartDataModel(ChartType.line);
              break;
            case bar:
              model = new NumberChartDataModel(ChartType.bar);
              break;
            case pie:
              model = new StringChartDataModel(ChartType.pie);
              break;
            default:
View Full Code Here


                Object y = p.getY();

                //the first point determine type of data model
                if (model == null) {
                    if (x instanceof Number && y instanceof Number) {
                        model = new NumberChartDataModel(type);
                    }
                    else if(x instanceof String && y instanceof Number){
                        model = new StringChartDataModel(type);
                    }
                    else {
View Full Code Here

   
   
    @PostConstruct
    public void init(){
      cntry = new LinkedList<Country>();
      err = new NumberChartDataModel(ChartType.line);
     
        position = "ne";
        sorting = "";
        positions = new ArrayList<String>(Arrays.asList("nw","sw","ne","se"));
        sortings = new ArrayList<String>(Arrays.asList("ascending","descending",""));
       
        a = new NumberChartDataModel(ChartDataModel.ChartType.line);
        a.put(1, 8);
        a.put(2, 12);
        a.put(3, 13);
        a.put(4, 14);
        a.put(5, 16);
        a.put(6, 18);
        a.put(7, 15);
        a.put(8, 20);
        a.put(9, 21);
        a.put(10, 15);
        a.put(12, 16);
        a.put(13, 18);
        a.put(14, 20);
       
       
       
        b = new NumberChartDataModel(ChartDataModel.ChartType.line);
        b.put(2, 6);
        b.put(3, 10);
        b.put(4, 11);
        b.put(5, 12);
        b.put(6, 15);
        b.put(7, 16);
        b.put(8, 14);
        b.put(9, 14);
        b.put(10, 14);
   
        barModel = new NumberChartDataModel(ChartDataModel.ChartType.bar);
        barModel.put(2,3);
        barModel.put(4,6);
        barModel.put(5,4);
        barModel.put(6,7);
       
        c = new NumberChartDataModel(ChartDataModel.ChartType.line);
        c.put(2, 6);
        c.put(3, 8);
        c.put(5, 4);
        c.put(10, 6);
        c.put(14, 8);
View Full Code Here

TOP

Related Classes of org.richfaces.sandbox.chart.model.NumberChartDataModel

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.