Package com.invient.vaadin.charts.InvientCharts

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


                x = value[0];
                y = value[1];
            } else {
                x = value[0];
            }
            points.add(new DecimalPoint(series, x, y));
        }
        return points;
    }
View Full Code Here


        chartConfig.addSeriesConfig(scatterCfg);
        // chart data
        InvientCharts chart = new InvientCharts(chartConfig);

        XYSeries seriesData = new XYSeries("User Supplied Data");
        seriesData.addPoint(new DecimalPoint(seriesData, 20, 20));
        seriesData.addPoint(new DecimalPoint(seriesData, 80, 80));
        chart.addSeries(seriesData);

        chart.addListener(new ChartClickListener() {

            @Override
            public void chartClick(ChartClickEvent chartClickEvent) {
                logEventInfo("chartClick",
                        ((DecimalPoint) chartClickEvent.getPoint()).getX(),
                        ((DecimalPoint) chartClickEvent.getPoint()).getY(),
                        chartClickEvent.getMousePosition().getMouseX(),
                        chartClickEvent.getMousePosition().getMouseY());
                XYSeries xySeries = (XYSeries) chartClickEvent.getChart()
                        .getSeries("User Supplied Data");
                xySeries.addPoint(new DecimalPoint(xySeries,
                        ((DecimalPoint) chartClickEvent.getPoint()).getX(),
                        ((DecimalPoint) chartClickEvent.getPoint()).getY()));
            }
        });
View Full Code Here

        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);

        addChart(chart);
    }
View Full Code Here

    private void addNullPoints(
            LinkedHashSet<InvientCharts.DecimalPoint> points, Series series,
            int howManyNullPoints) {
        for (int cnt = 0; cnt < howManyNullPoints; cnt++) {
            points.add(new DecimalPoint(series));
        }
    }
View Full Code Here

        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

        addChart(chart);
    }

    private DecimalPoint getPointWithColor(Series series, String name,
            double y, Color color) {
        DecimalPoint point = new DecimalPoint(series, name, y);
        point.setConfig(new PointConfig(color));
        return point;
    }
View Full Code Here

        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

TOP

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

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.