/** * Stores the chart as PNG image file. * * @param filename The filename of the resulting PNG file. * @param width The width of the chart. * @param height The height of the chart. */ public void saveAsPng(final String filename, final int width, final int height) { try { ChartUtilities.saveChartAsPNG(new File(filename), getChart(), width, height, null, true, 9); } catch (IOException e) { e.printStackTrace(); } catch ( Exception e ) { e.printStackTrace() ; // I just had an out of bounds error inside the method; don't know what that means but does not feel like a reason // to not continue. kai, apr'30 } }