Package org.jfree.chart

Examples of org.jfree.chart.JFreeChart


    }

    final XYPlot plot = new XYPlot(dataset, domainAxis, valueAxis, renderer);
    plot.setOrientation(orientation);

    return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
        plot, legend);
  }
View Full Code Here


   * @return A chart.
   */
  private JFreeChart createChart(final int year)
  {

    final JFreeChart chart = ChartFactory.createPieChart3D(
        "Programming Language of the Year " + year, // chart title
        createSampleDataset(), // data
        true, // include legend
        true,
        false
    );

    // set the background color for the chart...
    final PiePlot3D plot = (PiePlot3D) chart.getPlot();
    plot.setStartAngle(270);
//    plot.setDirection(Rotation.CLOCKWISE);
    plot.setForegroundAlpha(0.5f);
    plot.setNoDataMessage("No data to display");

View Full Code Here

   * @return A chart.
   */
  private JFreeChart createChart(final PieDataset dataset)
  {

    final JFreeChart chart = ChartFactory.createPieChart3D(
        "Pie Chart 3D Demo 1", // chart title
        dataset, // data
        true, // include legend
        true,
        false
    );

    // set the background color for the chart...
    chart.setBackgroundPaint(Color.yellow);
    final PiePlot3D plot = (PiePlot3D) chart.getPlot();
    plot.setStartAngle(270);
//    plot.setDirection(Rotation.CLOCKWISE);
    plot.setForegroundAlpha(0.5f);
    plot.setNoDataMessage("No data to display");

View Full Code Here

  {
    final MasterReport report = parseReport();
    // create a dataset...
    final PieDataset dataset = createSampleDataset();
    // create the chart...
    final JFreeChart chart = createChart(dataset);
    report.getParameterValues().put("Chart", chart);
    return report;
  }
View Full Code Here

    dotWidth = 5;
  }

  protected JFreeChart computeXYChart(final XYDataset xyDataset)
  {
    final JFreeChart chart;
    if (xyDataset instanceof TimeSeriesCollection)
    {
      chart =
          ChartFactory.createTimeSeriesChart(computeTitle(), getDomainTitle(), getRangeTitle(), xyDataset,
              isShowLegend(), false, false);
      final XYPlot xyPlot = chart.getXYPlot();
      final XYLineAndShapeRenderer itemRenderer = (XYLineAndShapeRenderer) xyPlot.getRenderer();
      final XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer(false, true);
      renderer.setBaseToolTipGenerator(itemRenderer.getBaseToolTipGenerator());
      renderer.setURLGenerator(itemRenderer.getURLGenerator());
      xyPlot.setRenderer(renderer);

    }
    else
    {
      final PlotOrientation orientation = computePlotOrientation();
      chart = ChartFactory.createScatterPlot(computeTitle(), getDomainTitle(), getRangeTitle(),
          xyDataset, orientation, isShowLegend(), false, false);
    }

    chart.getXYPlot().setRenderer(new XYDotRenderer());
    configureLogarithmicAxis(chart.getXYPlot());
    return chart;
  }
View Full Code Here

   * @return A chart.
   */
  private JFreeChart createChart(final PieDataset dataset)
  {

    final JFreeChart chart = ChartFactory.createPieChart3D(
        "Pie Chart 3D Demo 1", // chart title
        dataset, // data
        true, // include legend
        true,
        false
    );

    // set the background color for the chart...
    chart.setBackgroundPaint(Color.yellow);
    final PiePlot3D plot = (PiePlot3D) chart.getPlot();
    plot.setStartAngle(270);
//    plot.setDirection(Rotation.CLOCKWISE);
    plot.setForegroundAlpha(0.5f);
    plot.setNoDataMessage("No data to display");

View Full Code Here

  {
    final MasterReport report = parseReport();
    // create a dataset...
    final PieDataset dataset = createSampleDataset();
    // create the chart...
    final JFreeChart chart = createChart(dataset);
    report.getParameterValues().put("Chart", chart);
    return report;
  }
View Full Code Here

   * @return A chart.
   */
  private JFreeChart createChart(final int year)
  {

    final JFreeChart chart = ChartFactory.createPieChart3D(
        "Programming Language of the Year " + year, // chart title
        createSampleDataset(), // data
        true, // include legend
        true,
        false
    );

    // set the background color for the chart...
    final PiePlot3D plot = (PiePlot3D) chart.getPlot();
    plot.setStartAngle(270);
//    plot.setDirection(Rotation.CLOCKWISE);
    plot.setForegroundAlpha(0.5f);
    plot.setNoDataMessage("No data to display");

View Full Code Here

    }

    //Instantiate a spiderwebplot
    final ExtendedSpiderWebPlot plot = new ExtendedSpiderWebPlot(defaultDataset);
    //Instantiate a JFreeChart using the plot from above
    return new JFreeChart(computeTitle(), JFreeChart.DEFAULT_TITLE_FONT, plot, isShowLegend());
  }
View Full Code Here

  {
  }

  protected JFreeChart computeCategoryChart(final CategoryDataset dataset)
  {
    final JFreeChart chart = ChartFactory.createWaterfallChart(computeTitle(), getCategoryAxisLabel(),
        getValueAxisLabel(), dataset,
        computePlotOrientation(), isShowLegend(), false, false);
    chart.getCategoryPlot().setDomainAxis(new FormattedCategoryAxis(getCategoryAxisLabel(),
          getCategoricalAxisMessageFormat(), getRuntime().getResourceBundleFactory().getLocale()));
    return chart;
  }
View Full Code Here

TOP

Related Classes of org.jfree.chart.JFreeChart

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.