不知道为什么图片输出到文件中或者jsp后只有网格线,没有曲线,用jfreechart做的动态曲线
// java.io.FileOutputStream out=null;// try{
// try {
// out = new java.io.FileOutputStream("WebRoot/chart/chart.png");
// } catch (FileNotFoundException e) {
// // TODO Auto-generated catch block// e.printStackTrace();
// }
// try {
// org.jfree.chart.ChartUtilities.writeChartAsPNG(out, jfreechart, 500, 300);
// } catch (IOException e) {
// // TODO Auto-generated catch block// e.printStackTrace();
// }
// try {
// out.flush();
// } catch (IOException e) {
// // TODO Auto-generated catch block// e.printStackTrace();// }// }finally{// try{// out.close();// }catch(IOException e){}// try {// Thread.sleep(3000);// } catch (InterruptedException e) {// // TODO Auto-generated catch block// e.printStackTrace();// }
// }
response.setContentType("image/png"); ChartUtilities.writeChartAsPNG(out, chart, 500, 300); jfreechart 网格 图片 jsp --------------------编程问答-------------------- 除
补充:Java , Web 开发