pieDataset.setValue(key + " " + amount, new Double(chartData.getChartKunInvoiceAmount().doubleValue()));
}
String title = "Monthly amount for year 2009";
JFreeChart chart = ChartFactory.createPieChart3D(title, pieDataset, true, true, true);
PiePlot3D plot = (PiePlot3D) chart.getPlot();
plot.setForegroundAlpha(0.5f);
BufferedImage bi = chart.createBufferedImage(chartWidth, chartHeight, BufferedImage.TRANSLUCENT, null);
byte[] bytes = EncoderUtil.encode(bi, ImageFormat.PNG, true);
AImage chartImage = new AImage("Pie Chart", bytes);