Class LineChartGenerator


  • public class LineChartGenerator
    extends Object
    An utility class for simple chart image generation.
    Since:
    0.7.3
    Author:
    Andrea Antonello (www.hydrologis.com)
    • Constructor Detail

      • LineChartGenerator

        public LineChartGenerator​(String title,
                                  String xLabel,
                                  String yLabel)
    • Method Detail

      • addDatasetMatrix

        public void addDatasetMatrix​(double[][] data,
                                     String seriesName)
      • dumpChart

        public void dumpChart​(File chartFile,
                              boolean autoRange,
                              boolean withLegend,
                              int imageWidth,
                              int imageHeight)
                       throws IOException
        Creates the chart image and dumps it to file.
        Parameters:
        chartFile - the file to which to write to.
        autoRange - flag to define if to auto define the range from the bounds.
        withLegend - flag to define the legend presence.
        imageWidth - the output image width (if -1 default is used).
        imageHeight - the output image height (if -1 default is used).
        Throws:
        IOException