PiePlot plot = (PiePlot)pieChart.getPlot();
plot.setForegroundAlpha(0.65f);
plot.setNoDataMessage("There are no currently open tickets.");
// print the chart image directly the the HTTP stream
OutputStream out = response.getOutputStream();
response.setContentType("image/jpeg");
try
{
ChartUtilities.writeChartAsJPEG(out, 1.0f, pieChart, 400, 300);
}catch(IOException e){
logger.error("[getOpportunityPieData] Exception thrown.", e);
throw new ServletException(e);
}finally{
out.close();
}
// return null (don't forward anywhere, we've done the output already)
return(null);
} // end execute() method