code: @SuppressWarnings("nls")
      public void dumpChart( File chartFile, boolean autoRange, boolean withLegend, int imageWidth, int imageHeight )
              throws IOException {
          JFreeChart chart = ChartFactory.createXYLineChart(title, xLabel, yLabel, collection, PlotOrientation.VERTICAL, withLegend,
                  false, false);
          XYPlot plot = (XYPlot) chart.getPlot();
          // plot.setDomainPannable(true);
          // plot.setRangePannable(true);
  
          // plot.setForegroundAlpha(0.85f);
          NumberAxis yAxis = (NumberAxis) plot.getRangeAxis();
          yAxis.setStandardTickUnits(NumberAxis.createStandardTickUnits());
  
          if (autoRange) {
              double delta = (max - min) * 0.1;
              yAxis.setRange(min - delta, max + delta);
              // TODO reactivate if newer jfree is used
              // yAxis.setMinorTickCount(4);
              // yAxis.setMinorTickMarksVisible(true);
          }
          // ValueAxis xAxis = plot.getDomainAxis();
          // xAxis.setStandardTickUnits(NumberAxis.createStandardTickUnits(Locale.US));
  
          // XYItemRenderer renderer = plot.getRenderer();
          // renderer.setDrawBarOutline(false);
          // // flat bars look best...
          // renderer.setBarPainter(new StandardXYBarPainter());
          // renderer.setShadowVisible(false);
  
          if (!chartFile.getName().endsWith(".png")) {
              chartFile = FileUtilities.substituteExtention(chartFile, "png");
          }
          if (imageWidth == -1) {
              imageWidth = IMAGEWIDTH;
          }
          if (imageHeight == -1) {
              imageHeight = IMAGEHEIGHT;
          }
          BufferedImage bufferedImage = chart.createBufferedImage(imageWidth, imageHeight);
          ImageIO.write(bufferedImage, "png", chartFile);
      }
docs: Creates the chart image and dumps it to file.
  
  @param chartFile the file to which to write to.
  @param autoRange flag to define if to auto define the range from the bounds.
  @param withLegend flag to define the legend presence.
  @param imageWidth the output image width (if -1 default is used).
  @param imageHeight the output image height (if -1 default is used).
  @throws IOException