Package org.projectforge.charting

Examples of org.projectforge.charting.XYChartBuilder


      dh.add(Calendar.DATE, 1);
    }
    final TimeSeriesCollection dataset = new TimeSeriesCollection();
    dataset.addSeries(sollSeries);
    dataset.addSeries(istSeries);
    final XYChartBuilder cb = new XYChartBuilder(null,  null,  null,  dataset, false);
    final XYDifferenceRenderer diffRenderer = new XYDifferenceRenderer(cb.getRedFill(), cb.getGreenFill(), true);
    diffRenderer.setSeriesPaint(0, cb.getRedMarker());
    diffRenderer.setSeriesPaint(1, cb.getGreenMarker());
    cb.setRenderer(0, diffRenderer).setStrongStyle(diffRenderer, false, sollSeries, istSeries);
    cb.setDateXAxis(true).setYAxis(true, "hours");
    return cb.getChart();
  }
View Full Code Here


        numberOfBookedDays), 1, RoundingMode.HALF_UP) : BigDecimal.ZERO;

    final TimeSeriesCollection dataset = new TimeSeriesCollection();
    dataset.addSeries(actualSeries);
    dataset.addSeries(planSeries);
    final XYChartBuilder cb = new XYChartBuilder(null,  null,  null,  dataset, false);
    final XYDifferenceRenderer diffRenderer = new XYDifferenceRenderer(cb.getRedFill(), cb.getGreenFill(), true);
    diffRenderer.setSeriesPaint(0, cb.getRedMarker());
    diffRenderer.setSeriesPaint(1, cb.getGreenMarker());
    cb.setRenderer(0, diffRenderer).setStrongStyle(diffRenderer, false, actualSeries, planSeries);
    cb.setDateXAxis(true).setYAxis(true, "days");
    return cb.getChart();
  }
View Full Code Here

      accumulatedSeriesExpected.add(day, accumulatedExpected);
      worstCaseSeries.add(day, worstCase);
      dh.add(Calendar.DATE, 1);
    }
    dh.add(Calendar.DATE, -1);
    final XYChartBuilder cb = new XYChartBuilder(null, null, null, null, true);

    int counter = 0;

    final TimeSeriesCollection xyDataSeries = new TimeSeriesCollection();
    xyDataSeries.addSeries(accumulatedSeries);
    xyDataSeries.addSeries(worstCaseSeries);
    final XYLineAndShapeRenderer lineRenderer = new XYLineAndShapeRenderer(true, false);
    lineRenderer.setSeriesPaint(0, Color.BLACK);
    lineRenderer.setSeriesVisibleInLegend(0, true);
    lineRenderer.setSeriesPaint(1, cb.getGrayMarker());
    lineRenderer.setSeriesStroke(1, cb.getDashedStroke());
    lineRenderer.setSeriesVisibleInLegend(1, true);
    cb.setRenderer(counter, lineRenderer).setDataset(counter++, xyDataSeries);

    final TimeSeriesCollection accumulatedSet = new TimeSeriesCollection();
    accumulatedSet.addSeries(accumulatedSeriesExpected);
    final XYDifferenceRenderer diffRenderer = new XYDifferenceRenderer(cb.getGreenFill(), cb.getRedFill(), true);
    diffRenderer.setSeriesPaint(0, cb.getRedMarker());
    cb.setRenderer(counter, diffRenderer).setDataset(counter++, accumulatedSet)
    .setStrongStyle(diffRenderer, false, accumulatedSeriesExpected);
    diffRenderer.setSeriesVisibleInLegend(0, true);

    cb.setDateXAxis(true).setDateXAxisRange(lower, dh.getDate()).setYAxis(true, null);
    return cb.getChart();
  }
View Full Code Here

      creditSeries.add(day, cashFlow.getCreditsExpected()[i].doubleValue());
      debitSeries.add(day, cashFlow.getDebitsExpected()[i].doubleValue());
      dh.add(Calendar.DATE, 1);
    }
    dh.add(Calendar.DATE, -1);
    final XYChartBuilder cb = new XYChartBuilder(ChartFactory.createXYBarChart(null, null, false, null, null, PlotOrientation.VERTICAL,
        false, false, false));
    int counter = 0;

    final TimeSeriesCollection xyDataSeries = new TimeSeriesCollection();
    xyDataSeries.addSeries(accumulatedSeriesExpected);
    final XYLineAndShapeRenderer lineRenderer = new XYLineAndShapeRenderer(true, true);
    lineRenderer.setSeriesPaint(0, cb.getRedMarker());
    lineRenderer.setSeriesVisibleInLegend(0, true);
    cb.setRenderer(counter, lineRenderer).setDataset(counter++, xyDataSeries)
    .setStrongStyle(lineRenderer, false, accumulatedSeriesExpected);

    final TimeSeriesCollection cashflowSet = new TimeSeriesCollection();
    cashflowSet.addSeries(debitSeries);
    cashflowSet.addSeries(creditSeries);
    final XYBarRenderer barRenderer = new XYBarRenderer(.2);
    barRenderer.setSeriesPaint(0, cb.getGreenFill());
    barRenderer.setSeriesPaint(1, cb.getRedFill());
    barRenderer.setShadowVisible(false);
    cb.setRenderer(counter, barRenderer).setDataset(counter++, cashflowSet);

    cb.setDateXAxis(true).setDateXAxisRange(lower, dh.getDate()).setYAxis(true, null);
    return cb.getChart();
  }
View Full Code Here

TOP

Related Classes of org.projectforge.charting.XYChartBuilder

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.