List of usage examples for org.jfree.chart ChartUtils saveChartAsPNG
public static void saveChartAsPNG(File file, JFreeChart chart, int width, int height) throws IOException
From source file:net.atomique.ksar.graph.Graph.java
public int savePNG(final String filename, final int width, final int height) { try {/* w w w . j a v a 2 s. co m*/ ChartUtils.saveChartAsPNG(new File(filename), this.getgraph(mysar.myparser.getStartOfGraph(), mysar.myparser.getEndOfGraph()), width, height); } catch (IOException e) { log.error("Unable to write to : {}", filename); return -1; } return 0; }