Example usage for org.jfree.chart ChartFactory createStackedXYAreaChart

List of usage examples for org.jfree.chart ChartFactory createStackedXYAreaChart

Introduction

In this page you can find the example usage for org.jfree.chart ChartFactory createStackedXYAreaChart.

Prototype

public static JFreeChart createStackedXYAreaChart(String title, String xAxisLabel, String yAxisLabel,
        TableXYDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls) 

Source Link

Document

Creates a stacked XY area plot.

Usage

From source file:edu.ucla.stat.SOCR.chart.ChartGenerator_JTable.java

private JFreeChart createTableXYAreaChart(String title, String xLabel, String yLabel, TableXYDataset dataset) {
    JFreeChart chart = ChartFactory.createStackedXYAreaChart(title, // chart title
            xLabel, // x axis label
            yLabel, // y axis label
            dataset, // data
            orientation, true, // include legend
            true, // tooltips
            false // urls
    );/*w  w w. j  a v a  2 s .  c o  m*/

    XYPlot plot = (XYPlot) chart.getPlot();
    StackedXYAreaRenderer2 renderer = new StackedXYAreaRenderer2();
    // renderer.setToolTipGenerator(new StandardXYToolTipGenerator());
    plot.setRenderer(0, renderer);

    return chart;
}