Example usage for org.jfree.chart ChartFactory createStackedAreaChart

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

Introduction

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

Prototype

public static JFreeChart createStackedAreaChart(String title, String categoryAxisLabel, String valueAxisLabel,
        CategoryDataset dataset) 

Source Link

Document

Creates a stacked area chart with default settings.

Usage

From source file:project16.Home16.java

void RenderChart() {
    CategoryDataset ds = createDataset();

    JFreeChart chart = ChartFactory.createStackedAreaChart("", "", "", ds);
    chart.setBackgroundPaint(new Color(54, 63, 73));
    chart.setBorderVisible(false);//from   ww w . j a v  a 2 s  .  c  o m
    chart.setBorderPaint(new Color(54, 63, 73));
    chart.getCategoryPlot().setBackgroundPaint(new Color(54, 63, 73));
    chart.getCategoryPlot().setDomainGridlinePaint(new Color(54, 63, 73));
    chart.getCategoryPlot().setDomainGridlinesVisible(false);
    chart.getCategoryPlot().setOutlinePaint(new Color(54, 63, 73));

    ChartPanel cp = new ChartPanel(chart);
    cp.setBackground(new Color(54, 63, 73));

    pnl_chart.add(cp, BorderLayout.CENTER);
    pnl_chart.validate();

}