Package org.richfaces.model

Examples of org.richfaces.model.StringChartDataModel


        gdp.add(new GDPRecord("United States", 188217, 2995787, 12500746));
        gdp.add(new GDPRecord("China", 830931, 3726848, 3669259));
        gdp.add(new GDPRecord("Japan", 71568, 1640091, 4258274));
        gdp.add(new GDPRecord("Germany", 27205, 955563, 2417812));

        pie = new StringChartDataModel(ChartDataModel.ChartType.pie);
        pie.put("Industrial sector", 2995787);
        pie.put("Agricultural sector", 188217);
        pie.put("Service sector", 12500746);
    }
View Full Code Here


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

        cars = new StringChartDataModel(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

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

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

TOP

Related Classes of org.richfaces.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.