Package com.invient.vaadin.charts

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


        symbolMarker.setLineColor(new RGB(102, 102, 102));
        symbolMarker.setLineWidth(1);
        splineCfg.setMarker(symbolMarker);
        chartConfig.addSeriesConfig(splineCfg);

        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


                                + " $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

                    }
                    pbits.write(0, bits, 0, bits.length);
                    SIZE size = new SIZE();
                    size.cx = w;
                    size.cy = h;
                    POINT srcLoc = new POINT();
                    BLENDFUNCTION blend = new BLENDFUNCTION();
                    POINT loc = new POINT();
                    loc.x = win.getX();
                    loc.y = win.getY();
                    HWND hWnd = getHWnd(win);
                    // extract current constant alpha setting, if possible
                    ByteByReference bref = new ByteByReference();
View Full Code Here

                pbits.write(0, bits, 0, bits.length);
               
                SIZE size = new SIZE();
                size.cx = w;
                size.cy = h;
                POINT loc = new POINT();
                loc.x = alphaWindow.getX();
                loc.y = alphaWindow.getY();
                POINT srcLoc = new POINT();
                BLENDFUNCTION blend = new BLENDFUNCTION();
                blend.SourceConstantAlpha = (byte)(alpha * 255);
                blend.AlphaFormat = User32.AC_SRC_ALPHA;
                user.UpdateLayeredWindow(hWnd, screenDC, loc, size, memDC, srcLoc,
                                         0, blend, User32.ULW_ALPHA);
View Full Code Here

            List sizes = new ArrayList();
            while (!pi.isDone()) {
                int type = pi.currentSegment(coords);
                if (type == PathIterator.SEG_MOVETO) {
                    size = 1;
                    points.add(new POINT((int)coords[0], (int)coords[1]));
                }
                else if (type == PathIterator.SEG_LINETO) {
                    ++size;
                    points.add(new POINT((int)coords[0], (int)coords[1]));
                }
                else if (type == PathIterator.SEG_CLOSE) {
                    sizes.add(new Integer(size));
                }
                else {
                    throw new RuntimeException("Area is not polygonal: " + area);
                }
                pi.next();
            }
            POINT[] lppt = (POINT[])new POINT().toArray(points.size());
            POINT[] pts = (POINT[])points.toArray(new POINT[points.size()]);
            for (int i=0;i < lppt.length;i++) {
                lppt[i].x = pts[i].x;
                lppt[i].y = pts[i].y;
            }
View Full Code Here

                        pbits.write((v*ww+origin.x)*4, bits, 0, bits.length);
                    }
                    SIZE winSize = new SIZE();
                    winSize.cx = win.getWidth();
                    winSize.cy = win.getHeight();
                    POINT winLoc = new POINT();
                    winLoc.x = win.getX();
                    winLoc.y = win.getY();
                    POINT srcLoc = new POINT();
                    BLENDFUNCTION blend = new BLENDFUNCTION();
                    HWND hWnd = getHWnd(win);
                    // extract current constant alpha setting, if possible
                    ByteByReference bref = new ByteByReference();
                    IntByReference iref = new IntByReference();
View Full Code Here

TOP

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

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.