olá estou com o seguinte problema, quando entra na página onde eu gero o gráfico dá problema no servidor tomcat que estou hospedando o meu site, ocasionando estouro de memória ai para a aplicação inteira, para gerar o gráfico estou utilizando o seguinte código…
public String generateBarChartVert3D(HttpSession session){
String filename = null;
try{
DefaultCategoryDataset defaultCategoryDataset = new DefaultCategoryDataset();
defaultCategoryDataset.setValue(vlrEmpresa,"Média Empresa","Média Empresa");
defaultCategoryDataset.setValue(vlrMedia,projeto,projeto);
JFreeChart chart = ChartFactory.createBarChart3D(titulo,
null,
null,
defaultCategoryDataset,
PlotOrientation.VERTICAL,
true,
false,
false);
ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());
CategoryPlot categoryPlot = chart.getCategoryPlot();
CategoryItemRenderer renderer = categoryPlot.getRenderer();
renderer.setItemLabelGenerator(new StandardCategoryItemLabelGenerator());
renderer.setItemLabelsVisible(true);
renderer.setItemLabelFont(new Font("SansSerif", Font.PLAIN, 14));
filename = ServletUtilities.saveChartAsPNG(chart, 450, 200, session);
}catch(Exception e){
}
return filename;
}
ai na página coloco o seguinte…
graphURL = request.getContextPath() + “/servlet/DisplayChart?filename=”+graficoSetor.generateBarChartVert3D(session);
depois
agradecendo desde já