Package org.richfaces.sandbox.chart.model

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


              break;
            case bar:
              model = new NumberChartDataModel(ChartType.bar);
              break;
            case pie:
              model = new StringChartDataModel(ChartType.pie);
              break;
            default:
              break;
            }
                    }
View Full Code Here


                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 {
                        throw new IllegalArgumentException("Not supported type");
                    }
                }
View Full Code Here

        countries.add(usa);
        countries.add(china);
        countries.add(japan);
        countries.add(russia);

        cars = new StringChartDataModel(ChartDataModel.ChartType.bar);
        cars.put("San Marino", 1263);
        cars.put("United States", 797);
        cars.put("Denmark", 480);
        cars.put("Vietnam", 13);
        cars.put("Croatia",380);
View Full Code Here

        countries.add(usa);
        countries.add(china);
        countries.add(japan);
        countries.add(russia);
       
        cars = new StringChartDataModel(ChartDataModel.ChartType.bar);
        cars.put("San Marino", 1263);
        cars.put("United States", 797);
        cars.put("Denmark", 480);
        cars.put("Vietnam", 13);
        cars.put("Croatia",380);
View Full Code Here

        c.put(10, 6);
        c.put(14, 8);
        c.put(15, 4);
   
       
        pie = new StringChartDataModel(ChartDataModel.ChartType.pie);
        pie.put("Industrial sector", 2995787);
        pie.put("Agricultural sector", 188217);
        pie.put("Service sector", 12500746);
       
        category = new StringChartDataModel(ChartDataModel.ChartType.bar);
        category.put("A", 1);
        category.put("B", 2);
        category.put("C", 3);
       
        category2 = new StringChartDataModel(ChartDataModel.ChartType.bar);
        category2.put("A", 1);
        category2.put("B", 2);
        category2.put("C", 3);
       
        dateModel = new DateChartDataModel(ChartDataModel.ChartType.line);
        dateModel.put(new GregorianCalendar(2013, 4, 1).getTime(), 4);
        dateModel.put(new GregorianCalendar(2013, 4, 2).getTime(), 5);
        dateModel.put(new GregorianCalendar(2013, 4, 3).getTime(), 6);
       
       
        Country usa = new Country("USA");
        usa.put(1990,19.1);
        usa.put(1991,18.9);
        usa.put(1992,18.6);
        usa.put(1993,19.5);
        usa.put(1994,19.5);
        usa.put(1995,19.3);
        usa.put(1996,19.4);
        usa.put(1997,19.7);
        usa.put(1998,19.5);
        usa.put(1999,19.5);
        usa.put(2000,20.0);
       
        Country china = new Country("China");
        china.put(1990,2.2);
        china.put(1991,2.2);
        china.put(1992,2.3);
        china.put(1993,2.4);
        china.put(1994,2.6);
        china.put(1995,2.7);
        china.put(1996,2.8);
        china.put(1997,2.8);
        china.put(1998,2.7);
        china.put(1999,2.6);
        china.put(2000,2.7);
       
       
        Country japan = new Country("Japan");
        japan.put(1990, 9.4);
        japan.put(1991, 9.4);
        japan.put(1992, 9.5);
        japan.put(1993, 9.4);
        japan.put(1994, 9.9);
        japan.put(1995, 9.9);
        japan.put(1996, 10.1);
        japan.put(1997, 10.1);
        japan.put(1998, 9.7);
        japan.put(1999, 9.5);
        japan.put(2000, 9.7);
       
        Country russia = new Country("Russia");
        russia.put(1992,14);
        russia.put(1993,12.8);
        russia.put(1994,10.9);
        russia.put(1995,10.5);
        russia.put(1996,10.4);
        russia.put(1997,10);
        russia.put(1998,9.6);
        russia.put(1999,9.7);
        russia.put(2000,9.8);
       
               
       
        countries = new LinkedList<Country>();
        countries.add(usa);
        countries.add(china);
        countries.add(japan);
        countries.add(russia);
       
        cars = new StringChartDataModel(ChartDataModel.ChartType.bar);
        cars.put("San Marino", 1263);
        cars.put("United States", 797);
        cars.put("Denmark", 480);
        cars.put("Vietnam", 13);
        cars.put("Croatia",380);
View Full Code Here

TOP

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

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.