Example usage for org.jfree.chart.plot PiePlot setBackgroundImageAlpha

List of usage examples for org.jfree.chart.plot PiePlot setBackgroundImageAlpha

Introduction

In this page you can find the example usage for org.jfree.chart.plot PiePlot setBackgroundImageAlpha.

Prototype

public void setBackgroundImageAlpha(float alpha) 

Source Link

Document

Sets the alpha transparency used when drawing the background image.

Usage

From source file:com.rapidminer.template.gui.RoleRequirementSelector.java

private JFreeChart makeChart(ExampleSet exampleSet, Attribute att) {
    DefaultPieDataset pieDataset = new DefaultPieDataset();
    if (att.isNominal()) {
        for (String val : att.getMapping().getValues()) {
            pieDataset.setValue(val, exampleSet.getStatistics(att, Statistics.COUNT, val));
        }//  ww w. j a va2 s. c  om
    }
    JFreeChart chart = ChartFactory.createPieChart(null, pieDataset, true, false, false);
    chart.setBackgroundPaint(Color.WHITE);
    chart.getLegend().setFrame(BlockBorder.NONE);
    chart.setBackgroundImageAlpha(0.0f);
    chart.setBorderVisible(false);
    PiePlot plot = (PiePlot) chart.getPlot();
    plot.setLabelGenerator(null);
    plot.setShadowPaint(null);
    plot.setOutlineVisible(false);
    plot.setBackgroundPaint(new Color(255, 255, 255, 0));
    plot.setBackgroundImageAlpha(0.0f);
    plot.setCircular(true);
    return chart;
}