Package com.invient.vaadin.charts.InvientCharts

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


        splineCfg.setMarker(new SymbolMarker(true));
        chartConfig.addSeriesConfig(splineCfg);

        InvientCharts chart = new InvientCharts(chartConfig);

        XYSeries series = new XYSeries("Temperature");
        series.setSeriesPoints(getPoints(series, new double[] { 0, 15 },
                new double[] { 10, -50 }, new double[] { 20, -56.5 },
                new double[] { 30, -46.5 }, new double[] { 40, -22.1 },
                new double[] { 50, -2.5 }, new double[] { 60, -27.7 },
                new double[] { 70, -55.7 }, new double[] { 80, -76.5 }));
        chart.addSeries(series);
View Full Code Here


        InvientCharts chart = new InvientCharts(chartConfig);

        // Series
        splineCfg = new SplineConfig();
        splineCfg.setMarker(new SymbolMarker(Symbol.SQUARE));
        XYSeries series = new XYSeries("Tokyo", splineCfg);
        series.setSeriesPoints(getPoints(series, 7.0, 6.9, 9.5, 14.5, 18.2,
                21.5, 25.2));
        PointConfig config = new PointConfig(new ImageMarker(
                "/graphics/sun.png"));
        DecimalPoint highest = new DecimalPoint(series, 26.5, config);
        series.addPoint(highest);
        series.addPoint(new DecimalPoint(series, 23.3));
        series.addPoint(new DecimalPoint(series, 18.3));
        series.addPoint(new DecimalPoint(series, 13.9));
        series.addPoint(new DecimalPoint(series, 9.6));
        chart.addSeries(series);

        // Series
        splineCfg = new SplineConfig();
        splineCfg.setMarker(new SymbolMarker(Symbol.DIAMOND));
        series = new XYSeries("London", splineCfg);
        config = new PointConfig(new ImageMarker("/graphics/snow.png"));
        DecimalPoint lowest = new DecimalPoint(series, 3.9, config);
        series.addPoint(lowest);
        series.addPoint(new DecimalPoint(series, 4.2));
        series.addPoint(new DecimalPoint(series, 5.7));
        series.addPoint(new DecimalPoint(series, 8.5));
        series.addPoint(new DecimalPoint(series, 11.9));
        series.addPoint(new DecimalPoint(series, 15.2));
        series.addPoint(new DecimalPoint(series, 17.0));
        series.addPoint(new DecimalPoint(series, 16.6));
        series.addPoint(new DecimalPoint(series, 14.2));
        series.addPoint(new DecimalPoint(series, 10.3));
        series.addPoint(new DecimalPoint(series, 6.6));
        series.addPoint(new DecimalPoint(series, 4.8));
        chart.addSeries(series);

        addChart(chart);

    }
View Full Code Here

        yAxesSet.add(yAxis);
        chartConfig.setYAxes(yAxesSet);

        InvientCharts chart = new InvientCharts(chartConfig);

        XYSeries seriesData = new XYSeries("Jane", SeriesType.COLUMN);
        seriesData.setSeriesPoints(getPoints(seriesData, 3, 2, 1, 3, 4));
        chart.addSeries(seriesData);

        seriesData = new XYSeries("John", SeriesType.COLUMN);
        seriesData.setSeriesPoints(getPoints(seriesData, 2, 3, 5, 7, 6));
        chart.addSeries(seriesData);

        seriesData = new XYSeries("Joe", SeriesType.COLUMN);
        seriesData.setSeriesPoints(getPoints(seriesData, 4, 3, 3, 9, 0));
        chart.addSeries(seriesData);

        seriesData = new XYSeries("Average", SeriesType.SPLINE);
        seriesData
                .setSeriesPoints(getPoints(seriesData, 3, 2.67, 3, 6.33, 3.33));
        chart.addSeries(seriesData);

        // Series Total consumption
        PieConfig pieCfg = new PieConfig();
        pieCfg.setCenterX(100);
        pieCfg.setCenterY(80);
        pieCfg.setSize(100);
        pieCfg.setShowInLegend(false);
        pieCfg.setDataLabel(new PieDataLabel());
        pieCfg.getDataLabel().setEnabled(false);

        XYSeries totalConsumpSeriesData = new XYSeries("Total consumption",
                SeriesType.PIE, pieCfg);
        PointConfig config = new PointConfig(new RGB(69, 114, 167));
        DecimalPoint point = new DecimalPoint(totalConsumpSeriesData, "Jane",
                13, config);
        totalConsumpSeriesData.addPoint(point);
        config = new PointConfig(new RGB(170, 70, 67));
        point = new DecimalPoint(totalConsumpSeriesData, "John", 23, config);
        totalConsumpSeriesData.addPoint(point);
        config = new PointConfig(new RGB(137, 165, 78));
        point = new DecimalPoint(totalConsumpSeriesData, "Joe", 19, config);
        totalConsumpSeriesData.addPoint(point);

        ChartLabel chartLabel = new ChartLabel();
        chartLabel.addLabel(new ChartLabelItem("Total fruit consumption",
                "{ left: '40px', top: '8px', color: 'black' }"));
        chartConfig.setChartLabel(chartLabel);
View Full Code Here

        InvientCharts chart = new InvientCharts(chartConfig);
        // Configuration of Rainfall series
        ColumnConfig colCfg = new ColumnConfig();
        colCfg.setColor(new RGB(69, 114, 167));
        // Rainfall series
        XYSeries rainfallSeriesData = new XYSeries("Rainfall",
                SeriesType.COLUMN, colCfg);
        rainfallSeriesData.setSeriesPoints(getPoints(rainfallSeriesData, 49.9,
                71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1,
                95.6, 54.4));
        rainfallSeriesData.setYAxis(rainfallAxis);
        chart.addSeries(rainfallSeriesData);

        // Configuration of Sealevel series
        SplineConfig seaLevelSplineCfg = new SplineConfig();
        seaLevelSplineCfg.setColor(new RGB(170, 70, 67));
        seaLevelSplineCfg.setMarker(new SymbolMarker(false));
        seaLevelSplineCfg.setDashStyle(DashStyle.SHORT_DOT);
        // Sealevel series
        XYSeries seaLevelSeriesData = new XYSeries("Sea-Level Pressure",
                SeriesType.SPLINE, seaLevelSplineCfg);
        seaLevelSeriesData.setSeriesPoints(getPoints(seaLevelSeriesData, 1016,
                1016, 1015.9, 1015.5, 1012.3, 1009.5, 1009.6, 1010.2, 1013.1,
                1016.9, 1018.2, 1016.7));
        seaLevelSeriesData.setYAxis(sealevelPressureAxis);
        chart.addSeries(seaLevelSeriesData);

        // Configuration of Temperature series
        SplineConfig tempSplineCfg = new SplineConfig();
        tempSplineCfg.setColor(new RGB(137, 165, 78));
        // Temperature series
        XYSeries tempSeriesData = new XYSeries("Temperature",
                SeriesType.SPLINE, tempSplineCfg);
        tempSeriesData.setSeriesPoints(getPoints(tempSeriesData, 7.0, 6.9, 9.5,
                14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6));
        chart.addSeries(tempSeriesData);

        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.