Example usage for org.jfree.chart.renderer WaferMapRenderer WaferMapRenderer

List of usage examples for org.jfree.chart.renderer WaferMapRenderer WaferMapRenderer

Introduction

In this page you can find the example usage for org.jfree.chart.renderer WaferMapRenderer WaferMapRenderer.

Prototype

public WaferMapRenderer() 

Source Link

Document

Creates a new renderer.

Usage

From source file:org.hxzon.demo.jfreechart.OtherDatasetDemo.java

private static JFreeChart createWaferMapChart(WaferMapDataset dataset) {
    WaferMapPlot plot = new WaferMapPlot(dataset);
    WaferMapRenderer renderer = new WaferMapRenderer();
    plot.setRenderer(renderer);/*from w ww .  ja v a2s  .  c  o  m*/

    JFreeChart chart = new JFreeChart("WaferMap Chart Demo", JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
    chart.setBackgroundPaint(Color.white);

    plot.setBackgroundPaint(Color.lightGray);

    return chart;
}

From source file:edu.dlnu.liuwenpeng.ChartFactory.ChartFactory.java

/**    
 * Creates a wafer map chart.    /* w ww .j a va 2  s.c  o m*/
 *    
 * @param title  the chart title (<code>null</code> permitted).    
 * @param dataset  the dataset (<code>null</code> permitted).    
 * @param orientation  the plot orientation (horizontal or vertical)     
 *                     (<code>null</code> NOT permitted.    
 * @param legend  display a legend?    
 * @param tooltips  generate tooltips?    
 * @param urls  generate URLs?    
 *    
 * @return A wafer map chart.    
 */
public static JFreeChart createWaferMapChart(String title, WaferMapDataset dataset, PlotOrientation orientation,
        boolean legend, boolean tooltips, boolean urls) {

    if (orientation == null) {
        throw new IllegalArgumentException("Null 'orientation' argument.");
    }
    WaferMapPlot plot = new WaferMapPlot(dataset);
    WaferMapRenderer renderer = new WaferMapRenderer();
    plot.setRenderer(renderer);

    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);

    return chart;
}

From source file:KIDLYFactory.java

/**
 * Creates a wafer map chart./*  ww  w  .  ja  va  2 s.  co  m*/
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param dataset  the dataset (<code>null</code> permitted).
 * @param orientation  the plot orientation (horizontal or vertical)
 *                     (<code>null</code> NOT permitted.
 * @param legend  display a legend?
 * @param tooltips  generate tooltips?
 * @param urls  generate URLs?
 *
 * @return A wafer map chart.
 */
public static JFreeChart createWaferMapChart(String title, WaferMapDataset dataset, PlotOrientation orientation,
        boolean legend, boolean tooltips, boolean urls) {

    if (orientation == null) {
        throw new IllegalArgumentException("Null 'orientation' argument.");
    }
    WaferMapPlot plot = new WaferMapPlot(dataset);
    WaferMapRenderer renderer = new WaferMapRenderer();
    plot.setRenderer(renderer);

    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
    currentTheme.apply(chart);
    return chart;
}

From source file:org.jfree.chart.ChartFactory.java

/**
 * Creates a wafer map chart./*from ww w . j  a  va2s.c o m*/
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param dataset  the dataset (<code>null</code> permitted).
 *
 * @return A wafer map chart.
 */
public static JFreeChart createWaferMapChart(String title, WaferMapDataset dataset) {

    WaferMapPlot plot = new WaferMapPlot(dataset);
    WaferMapRenderer renderer = new WaferMapRenderer();
    plot.setRenderer(renderer);

    JFreeChart chart = new JFreeChart(title, plot);
    currentTheme.apply(chart);
    return chart;
}