Examples of XYSeries


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

      for (Entry<Integer, DecimalPoint> decimalPoint : map.entrySet()) {
        quantity++;
        sum += decimalPoint.getValue().getY();
      }
      Double result = sum / quantity;
      XYSeries seriesData = new XYSeries(key + " (Ĺ›rednia = " + format.format(result) + ")");
      for (Entry<Integer, DecimalPoint> decimalPoint : map.entrySet()) {
        seriesData.addPoint(new DecimalPoint(seriesData, decimalPoint.getKey(),
            decimalPoint.getValue().getY()));
      }
      chart.addSeries(seriesData);
    }
  }
View Full Code Here

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

      public void buttonClick(final ClickEvent event) {
        double parseDouble = Double.parseDouble(textField.getValue().toString());
        Date date = (Date) dateField.getValue();
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        DecimalPoint p = new DecimalPoint(new XYSeries("2008"), Double.parseDouble(date
            .getMonth() + ""), parseDouble);
        int year = calendar.get(Calendar.YEAR);
        Map<Integer, DecimalPoint> map = main.points.get(year);
        if (map == null) {
          main.points.put(year, new LinkedHashMap<Integer, DecimalPoint>());
View Full Code Here

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

      chart.addSeries(seriesData);
    }
  }

  private void add2008(final InvientCharts chart) {
    XYSeries seriesData = new XYSeries("2008");
    seriesData.addPoint(new DecimalPoint(seriesData, 0, 153.13));
    seriesData.addPoint(new DecimalPoint(seriesData, 1, 195.23));
    seriesData.addPoint(new DecimalPoint(seriesData, 2, 102.62));
    seriesData.addPoint(new DecimalPoint(seriesData, 3, 102.15));
    seriesData.addPoint(new DecimalPoint(seriesData, 4, 70.74));
    seriesData.addPoint(new DecimalPoint(seriesData, 5, 145.47));
    seriesData.addPoint(new DecimalPoint(seriesData, 6, 127.92));
    seriesData.addPoint(new DecimalPoint(seriesData, 7, 87.08));
    seriesData.addPoint(new DecimalPoint(seriesData, 8, 101.99));
    seriesData.addPoint(new DecimalPoint(seriesData, 9, 123.28));
    seriesData.addPoint(new DecimalPoint(seriesData, 10, 89.85));
    seriesData.addPoint(new DecimalPoint(seriesData, 11, 145.01));
    int quantity = 0;
    points.put(2008, new LinkedHashMap<Integer, DecimalPoint>());
    for (DecimalPoint decimalPoint : seriesData.getPoints()) {
      points.get(2008).put(quantity, decimalPoint);
      quantity++;
    }
  }
View Full Code Here

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

      quantity++;
    }
  }

  private void add2009(final InvientCharts chart) {
    XYSeries seriesData = new XYSeries("2009");
    seriesData.addPoint(new DecimalPoint(seriesData, 0, 128.74));
    seriesData.addPoint(new DecimalPoint(seriesData, 1, 152.73));
    seriesData.addPoint(new DecimalPoint(seriesData, 2, 78.31));
    seriesData.addPoint(new DecimalPoint(seriesData, 3, 77.18));
    seriesData.addPoint(new DecimalPoint(seriesData, 4, 79.87));
    seriesData.addPoint(new DecimalPoint(seriesData, 5, 85.6));
    seriesData.addPoint(new DecimalPoint(seriesData, 6, 147.74));
    seriesData.addPoint(new DecimalPoint(seriesData, 7, 82.74));
    seriesData.addPoint(new DecimalPoint(seriesData, 8, 110.16));
    seriesData.addPoint(new DecimalPoint(seriesData, 9, 68.84));
    seriesData.addPoint(new DecimalPoint(seriesData, 10, 113.38));
    seriesData.addPoint(new DecimalPoint(seriesData, 11, 125.15));

    int quantity = 0;
    points.put(2009, new LinkedHashMap<Integer, DecimalPoint>());
    for (DecimalPoint decimalPoint : seriesData.getPoints()) {
      points.get(2009).put(quantity, decimalPoint);
      quantity++;
    }
  }
View Full Code Here

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

      quantity++;
    }
  }

  private void add2010(final InvientCharts chart) {
    XYSeries seriesData = new XYSeries("2010");
    seriesData.addPoint(new DecimalPoint(seriesData, 0, 135.14));
    seriesData.addPoint(new DecimalPoint(seriesData, 1, 139.89));
    seriesData.addPoint(new DecimalPoint(seriesData, 2, 95.3));
    seriesData.addPoint(new DecimalPoint(seriesData, 3, 100.73));
    seriesData.addPoint(new DecimalPoint(seriesData, 4, 65.45));
    seriesData.addPoint(new DecimalPoint(seriesData, 5, 108.8));
    seriesData.addPoint(new DecimalPoint(seriesData, 6, 136.7));
    seriesData.addPoint(new DecimalPoint(seriesData, 7, 116.23));
    seriesData.addPoint(new DecimalPoint(seriesData, 8, 86.58));
    seriesData.addPoint(new DecimalPoint(seriesData, 9, 135.5));
    seriesData.addPoint(new DecimalPoint(seriesData, 10, 124.43));
    seriesData.addPoint(new DecimalPoint(seriesData, 11, 173.33));
    int quantity = 0;
    points.put(2010, new LinkedHashMap<Integer, DecimalPoint>());
    for (DecimalPoint decimalPoint : seriesData.getPoints()) {
      points.get(2010).put(quantity, decimalPoint);
      quantity++;
    }
  }
View Full Code Here

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

      quantity++;
    }
  }

  private void add2011(final InvientCharts chart) {
    XYSeries seriesData = new XYSeries("2011");
    seriesData.addPoint(new DecimalPoint(seriesData, 0, 246.64));
    seriesData.addPoint(new DecimalPoint(seriesData, 1, 127.54));
    seriesData.addPoint(new DecimalPoint(seriesData, 2, 110.07));
    seriesData.addPoint(new DecimalPoint(seriesData, 3, 94.34));
    seriesData.addPoint(new DecimalPoint(seriesData, 4, 94.56));
    seriesData.addPoint(new DecimalPoint(seriesData, 5, 173.29));
    seriesData.addPoint(new DecimalPoint(seriesData, 6, 151.85));
    seriesData.addPoint(new DecimalPoint(seriesData, 7, 106.48));
    seriesData.addPoint(new DecimalPoint(seriesData, 8, 145.24));
    seriesData.addPoint(new DecimalPoint(seriesData, 9, 111.31));
    seriesData.addPoint(new DecimalPoint(seriesData, 10, 122.77));
    seriesData.addPoint(new DecimalPoint(seriesData, 11, 100.00));

    int quantity = 0;
    points.put(2011, new LinkedHashMap<Integer, DecimalPoint>());
    for (DecimalPoint decimalPoint : seriesData.getPoints()) {
      points.get(2011).put(quantity, decimalPoint);
      quantity++;
    }
  }
View Full Code Here

Examples of com.positive.charts.data.xy.XYSeries

    }
    if (samples < 2) {
      throw new IllegalArgumentException("Requires 'samples' > 1");
    }

    final XYSeries series = new XYSeries(seriesKey);
    final double step = (end - start) / samples;
    for (int i = 0; i <= samples; i++) {
      final double x = start + (step * i);
      series.add(x, f.getValue(x));
    }
    final XYSeriesCollection collection = new XYSeriesCollection(series);
    return collection;

  }
View Full Code Here

Examples of org.dussan.vaadin.dcharts.base.elements.XYseries

        dataSeries.add(names[i], values[i]);
       
      }
     
      Series series = new Series().addSeries(
              new XYseries().setShowLine(true).setMarkerOptions(new MarkerRenderer().setShadow(true).setSize(7).setStyle(MarkerStyles.CIRCLE)));
      options.setSeries(series);
     
      options.setAnimate(true);
      options.setAnimateReplot(true);
     
View Full Code Here

Examples of org.jfree.data.xy.XYSeries

public abstract class AbstractSeriesProvider implements SeriesProvider {

    protected Log logger = LogFactory.getLog(getClass());

    protected XYSeries toSeries(String legend, List stats) {
        XYSeries xySeries = new XYSeries(legend, true, false);
        synchronized (stats) {
            for (int i = 0; i < stats.size(); i++) {
                XYDataItem item = (XYDataItem) stats.get(i);
                xySeries.addOrUpdate(item.getX(), item.getY());
            }
        }
        return xySeries;
    }
View Full Code Here

Examples of org.jfree.data.xy.XYSeries

    final XYSeriesCollection xySeriesDataset = (XYSeriesCollection) getDatasourceValue();
    final List seriesList = xySeriesDataset.getSeries();
    final HashMap seriesMap = new HashMap();
    for (int i = 0; i < seriesList.size(); i++)
    {
      final XYSeries series = (XYSeries) seriesList.get(i);
      seriesMap.put(series.getKey(), series);
    }

    final String[] seriesNames = getSeriesName();
    final int maxIndex = Math.min(seriesNames.length, Math.min (this.xValueColumns.size(), this.yValueColumns.size()));
    for (int i = 0; i < maxIndex; i++)
    {
      String seriesName = seriesNames[i];
      final String xColumn = (String) xValueColumns.get(i);
      final String yColumn = (String) yValueColumns.get(i);
      final Object xValueObject = getDataRow().get(xColumn);
      final Object yValueObject = getDataRow().get(yColumn);

      if (isSeriesColumn())
      {
        final Object tmp = getDataRow().get(seriesName);
        if (tmp != null)
        {
          seriesName = tmp.toString();
        }
      }

      if (xValueObject instanceof Number == false)
      {
        continue;
      }
      final Number xValue = (Number) xValueObject;
      final Number yValue = (yValueObject instanceof Number) ? (Number) yValueObject : null;

      XYSeries series = (XYSeries) seriesMap.get(seriesName);
      if (series == null)
      {
        series = new XYSeries(seriesName);
        xySeriesDataset.addSeries(series);
        seriesMap.put (seriesName, series);
      }
      series.add(xValue, yValue);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.