Package com.invient.vaadin.charts

Examples of com.invient.vaadin.charts.InvientCharts$DateTimeSeries


                                + " $wnd.Highcharts.numberFormat(this.y, 2);"
                                + "}");

        chartConfig.getLegend().setEnabled(false);

        InvientCharts chart = new InvientCharts(chartConfig);

        DateTimeSeries seriesData = new DateTimeSeries("Random Data", true);
        LinkedHashSet<DateTimePoint> points = new LinkedHashSet<InvientCharts.DateTimePoint>();
        Date dtNow = new Date();
        // Add random data.
        for (int cnt = -19; cnt <= 0; cnt++) {
            points.add(new DateTimePoint(seriesData, getUpdatedDate(dtNow,
                    cnt * 1000), Math.random()));
        }
        seriesData.setSeriesPoints(points);
        chart.addSeries(seriesData);

        addChart(chart, false, false, false);

        indicator = new ProgressIndicator(0.2f);
        indicator.setPollingInterval(1000);
View Full Code Here


        splineCfg.setPointStart((double) getPointStartDate(2009, 8, 6));
        splineCfg.setPointInterval(3600000.0);
        chartConfig.addSeriesConfig(splineCfg);

        InvientCharts chart = new InvientCharts(chartConfig);
        DateTimeSeries series = new DateTimeSeries("Hestavollane", splineCfg, true);
        series.setSeriesPoints(getDateTimePoints(series, 4.3, 5.1, 4.3, 5.2,
                5.4, 4.7, 3.5, 4.1, 5.6, 7.4, 6.9, 7.1, 7.9, 7.9, 7.5, 6.7,
                7.7, 7.7, 7.4, 7.0, 7.1, 5.8, 5.9, 7.4, 8.2, 8.5, 9.4, 8.1,
                10.9, 10.4, 10.9, 12.4, 12.1, 9.5, 7.5, 7.1, 7.5, 8.1, 6.8,
                3.4, 2.1, 1.9, 2.8, 2.9, 1.3, 4.4, 4.2, 3.0, 3.0));
        chart.addSeries(series);

        series = new DateTimeSeries("Voll", splineCfg, true);
        series.setSeriesPoints(getDateTimePoints(series, 0.0, 0.0, 0.0, 0.0,
                0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.3, 0.0, 0.0, 0.4, 0.0, 0.1,
                0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.6, 1.2, 1.7,
                0.7, 2.9, 4.1, 2.6, 3.7, 3.9, 1.7, 2.3, 3.0, 3.3, 4.8, 5.0,
                4.8, 5.0, 3.2, 2.0, 0.9, 0.4, 0.3, 0.5, 0.4));
        chart.addSeries(series);

        addChart(chart);
    }
View Full Code Here

        yAxis.setAllowDecimals(false);
        LinkedHashSet<YAxis> yAxesSet = new LinkedHashSet<InvientChartsConfig.YAxis>();
        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);
        chart.addSeries(totalConsumpSeriesData);

        addChart(chart);
    }
View Full Code Here

                "function() {" + " return this.value +' mb'; " + "}");
        sealevelPressureAxis.setOpposite(true);
        yAxesSet.add(sealevelPressureAxis);
        chartConfig.setYAxes(yAxesSet);

        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

        marker.getHoverState().setEnabled(true);
        marker.getHoverState().setRadius(5);

        chartConfig.addSeriesConfig(areaCfg);

        InvientCharts chart = new InvientCharts(chartConfig);

        // Area configuration
        AreaConfig serieaAreaCfg = new AreaConfig();
        serieaAreaCfg.setPointStart((double) getPointStartDate(2006, 0, 01));
        serieaAreaCfg.setPointInterval(24 * 3600 * 1000.0);
        // Series
        DateTimeSeries dateTimeSeries = new DateTimeSeries("USD to EUR",
                SeriesType.AREA, serieaAreaCfg);

        dateTimeSeries
                .addPoint((DateTimePoint[]) getDateTimeSeriesPoints(dateTimeSeries));
        chart.addSeries(dateTimeSeries);

        addChart(chart);

    }
View Full Code Here

TOP

Related Classes of com.invient.vaadin.charts.InvientCharts$DateTimeSeries

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.