Package com.invient.vaadin.charts.InvientCharts

Examples of com.invient.vaadin.charts.InvientCharts.XYSeries


        areaCfg.setFillOpacity(0.5);
        chartConfig.addSeriesConfig(areaCfg);

        InvientCharts chart = new InvientCharts(chartConfig);

        XYSeries series = new XYSeries("John");
        series.setSeriesPoints(getPoints(series, 0, 1, 4, 4, 5, 2, 3, 7));
        chart.addSeries(series);

        series = new XYSeries("Jane");
        series.addPoint(new DecimalPoint(series, 1.0), new DecimalPoint(series,
                0.0), new DecimalPoint(series, 3.0), new DecimalPoint(series),
                new DecimalPoint(series, 3.0), new DecimalPoint(series, 1.0),
                new DecimalPoint(series, 2.0), new DecimalPoint(series, 1.0));
        chart.addSeries(series);
View Full Code Here


        chartConfig.addSeriesConfig(areaCfg);

        InvientCharts chart = new InvientCharts(chartConfig);

        XYSeries series = new XYSeries("Asia");
        series.setSeriesPoints(getPoints(series, 502, 635, 809, 947, 1402,
                3634, 5268));
        chart.addSeries(series);

        series = new XYSeries("Africa");
        series.setSeriesPoints(getPoints(series, 106, 107, 111, 133, 221, 767,
                1766));
        chart.addSeries(series);

        series = new XYSeries("Europe");
        series.setSeriesPoints(getPoints(series, 163, 203, 276, 408, 547, 729,
                628));
        chart.addSeries(series);

        series = new XYSeries("America");
        series.setSeriesPoints(getPoints(series, 18, 31, 54, 156, 339, 818,
                1201));
        chart.addSeries(series);

        series = new XYSeries("Oceania");
        series.setSeriesPoints(getPoints(series, 2, 2, 2, 6, 13, 30, 46));
        chart.addSeries(series);

        addChart(chart);
    }
View Full Code Here

        chartConfig.addSeriesConfig(areaCfg);

        InvientCharts chart = new InvientCharts(chartConfig);

        XYSeries series = new XYSeries("Asia");
        series.setSeriesPoints(getPoints(series, 502, 635, 809, 947, 1402,
                3634, 5268));
        chart.addSeries(series);

        series = new XYSeries("Africa");
        series.setSeriesPoints(getPoints(series, 106, 107, 111, 133, 221, 767,
                1766));
        chart.addSeries(series);

        series = new XYSeries("Europe");
        series.setSeriesPoints(getPoints(series, 163, 203, 276, 408, 547, 729,
                628));
        chart.addSeries(series);

        series = new XYSeries("America");
        series.setSeriesPoints(getPoints(series, 18, 31, 54, 156, 339, 818,
                1201));
        chart.addSeries(series);

        series = new XYSeries("Oceania");
        series.setSeriesPoints(getPoints(series, 2, 2, 2, 6, 13, 30, 46));
        chart.addSeries(series);

        addChart(chart);
    }
View Full Code Here

        InvientCharts chart = new InvientCharts(chartConfig);

        // Series -
        AreaConfig usaAreaCfg = new AreaConfig();
        usaAreaCfg.setPointStart(1940.0);
        XYSeries series = new XYSeries("USA", usaAreaCfg);

        LinkedHashSet<DecimalPoint> points = new LinkedHashSet<InvientCharts.DecimalPoint>();
        addNullPoints(points, series, 5);
        points.addAll(getPoints(series, 6, 11, 32, 110, 235, 369, 640, 1005,
                1436, 2063, 3057, 4618, 6444, 9822, 15468, 20434, 24126, 27387,
                29459, 31056, 31982, 32040, 31233, 29224, 27342, 26662, 26956,
                27912, 28999, 28965, 27826, 25579, 25722, 24826, 24605, 24304,
                23464, 23708, 24099, 24357, 24237, 24401, 24344, 23586, 22380,
                21004, 17287, 14747, 13076, 12555, 12144, 11009, 10950, 10871,
                10824, 10577, 10527, 10475, 10421, 10358, 10295, 10104));
        series.setSeriesPoints(points);
        chart.addSeries(series);

        // Series -
        AreaConfig russiaAreaCfg = new AreaConfig();
        russiaAreaCfg.setPointStart(1940.0);
        series = new XYSeries("USSR/Russia", russiaAreaCfg);
        points = new LinkedHashSet<InvientCharts.DecimalPoint>();
        addNullPoints(points, series, 10);
        points.addAll(getPoints(series, 5, 25, 50, 120, 150, 200, 426, 660,
                869, 1060, 1605, 2471, 3322, 4238, 5221, 6129, 7089, 8339,
                9399, 10538, 11643, 13092, 14478, 15915, 17385, 19055, 21205,
                23044, 25393, 27935, 30062, 32049, 33952, 35804, 37431, 39197,
                45000, 43000, 41000, 39000, 37000, 35000, 33000, 31000, 29000,
                27000, 25000, 24000, 23000, 22000, 21000, 20000, 19000, 18000,
                18000, 17000, 16000));
        series.setSeriesPoints(points);
        chart.addSeries(series);

        addChart(chart);
    }
View Full Code Here

        AreaSplineConfig areaSpline = new AreaSplineConfig();
        areaSpline.setFillOpacity(0.5);
        chartConfig.addSeriesConfig(areaSpline);
        InvientCharts chart = new InvientCharts(chartConfig);

        XYSeries series = new XYSeries("John");
        series.setSeriesPoints(getPoints(series, 3, 4, 3, 5, 4, 10, 12));
        chart.addSeries(series);

        series = new XYSeries("Jane");
        series.setSeriesPoints(getPoints(series, 1, 3, 4, 3, 3, 5, 4));
        chart.addSeries(series);

        addChart(chart);
    }
View Full Code Here

        pie.setShowInLegend(true);
        chartConfig.addSeriesConfig(pie);

        InvientCharts chart = new InvientCharts(chartConfig);

        XYSeries series = new XYSeries("Browser Share");
        LinkedHashSet<DecimalPoint> points = new LinkedHashSet<DecimalPoint>();
        points.add(new DecimalPoint(series, "Firefox", 45.0));
        points.add(new DecimalPoint(series, "IE", 26.8));
        PointConfig config = new PointConfig(true);
        points.add(new DecimalPoint(series, "Chrome", 12.8, config));
        points.add(new DecimalPoint(series, "Safari", 8.5));
        points.add(new DecimalPoint(series, "Opera", 6.2));
        points.add(new DecimalPoint(series, "Others", 0.7));

        series.setSeriesPoints(points);
        chart.addSeries(series);

        addChart(chart);
    }
View Full Code Here

        //
        PieConfig pieCfg = new PieConfig();
        pieCfg.setInnerSize(65);
        pieCfg.setDataLabel(new PieDataLabel(false));

        XYSeries series = new XYSeries("2008", SeriesType.PIE, pieCfg);
        LinkedHashSet<DecimalPoint> points = new LinkedHashSet<DecimalPoint>();
        points.add(getPointWithColor(series, "Firefox", 44.2, new RGB(69, 114,
                167)));
        points.add(getPointWithColor(series, "IE", 46.6, new RGB(170, 70, 67)));
        points.add(getPointWithColor(series, "Chrome", 3.1, new RGB(137, 165,
                78)));
        points.add(getPointWithColor(series, "Safari", 2.7, new RGB(128, 105,
                155)));
        points.add(getPointWithColor(series, "Opera", 2.3, new RGB(128, 105,
                155)));
        points.add(getPointWithColor(series, "Mozilla", 0.4, new RGB(219, 132,
                61)));
        series.setSeriesPoints(points);

        chart.addSeries(series);

        // Series 1
        pieCfg = new PieConfig();
        pieCfg.setInnerSize(150);
        pieCfg.setDataLabel(new PieDataLabel());
        pieCfg.setColor(new RGB(0, 0, 0));
        pieCfg.getDataLabel().setConnectorColor(new RGB(0, 0, 0));

        series = new XYSeries("2010", SeriesType.PIE, pieCfg);
        points = new LinkedHashSet<DecimalPoint>();
        points.add(getPointWithColor(series, "Firefox", 45.0, new RGB(69, 114,
                167)));
        points.add(getPointWithColor(series, "IE", 26.8, new RGB(170, 70, 67)));
        points.add(getPointWithColor(series, "Chrome", 12.8, new RGB(137, 165,
                78)));
        points.add(getPointWithColor(series, "Safari", 8.5, new RGB(128, 105,
                155)));
        points.add(getPointWithColor(series, "Opera", 6.2, new RGB(128, 105,
                155)));
        points.add(getPointWithColor(series, "Mozilla", 0.2, new RGB(219, 132,
                61)));
        series.setSeriesPoints(points);

        chart.addSeries(series);

        addChart(chart);
    }
View Full Code Here

        chartConfig.addSeriesConfig(pieCfg);

        InvientCharts chart = new InvientCharts(chartConfig);

        XYSeries series = new XYSeries("Browser Share");
        LinkedHashSet<DecimalPoint> points = new LinkedHashSet<DecimalPoint>();
        points.add(new DecimalPoint(series, "Firefox", 45.0));
        points.add(new DecimalPoint(series, "IE", 26.8));
        PointConfig config = new PointConfig(true);
        points.add(new DecimalPoint(series, "Chrome", 12.8, config));
        points.add(new DecimalPoint(series, "Safari", 8.5));
        points.add(new DecimalPoint(series, "Opera", 6.2));
        points.add(new DecimalPoint(series, "Others", 0.7));

        series.setSeriesPoints(points);
        chart.addSeries(series);

        addChart(chart);
    }
View Full Code Here

        InvientCharts chart = new InvientCharts(chartConfig);

        ScatterConfig femaleScatterCfg = new ScatterConfig();
        femaleScatterCfg.setColor(new RGBA(223, 83, 83, 0.5f));
        XYSeries series = new XYSeries("Female", femaleScatterCfg);
        series.setSeriesPoints(getScatterFemalePoints(series));
        chart.addSeries(series);

        ScatterConfig maleScatterCfg = new ScatterConfig();
        maleScatterCfg.setColor(new RGBA(119, 152, 191, 0.5f));
        series = new XYSeries("Male", maleScatterCfg);
        series.setSeriesPoints(getScatterMalePoints(series));
        chart.addSeries(series);
        addChart(chart);
    }
View Full Code Here

        LineConfig lineCfg = new LineConfig();
        lineCfg.setMarker(new SymbolMarker(false));
        lineCfg.setHoverState(new SeriesState());
        lineCfg.getHoverState().setLineWidth(0);

        XYSeries lineSeries = new XYSeries("Regression Line", lineCfg);
        lineSeries.setType(SeriesType.LINE);
        lineSeries.setSeriesPoints(getPoints(lineSeries,
                new double[] { 0, 1.11 }, new double[] { 5, 4.51 }));
        chart.addSeries(lineSeries);

        // Scatter series
        ScatterConfig scatterCfg = new ScatterConfig();
        scatterCfg.setMarker(new SymbolMarker(4));

        XYSeries scatterSeries = new XYSeries("Observations", scatterCfg);
        scatterSeries.setType(SeriesType.SCATTER);
        scatterSeries.setSeriesPoints(getPoints(scatterSeries, 1, 1.5, 2.8,
                3.5, 3.9, 4.2));
        chart.addSeries(scatterSeries);

        addChart(chart);
    }
View Full Code Here

TOP

Related Classes of com.invient.vaadin.charts.InvientCharts.XYSeries

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.