Class LineChartGenerator
- java.lang.Object
-
- org.hortonmachine.gears.utils.images.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 Summary
Constructors Constructor Description LineChartGenerator(String title, String xLabel, String yLabel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDatasetMatrix(double[][] data, String seriesName)voiddumpChart(File chartFile, boolean autoRange, boolean withLegend, int imageWidth, int imageHeight)Creates the chart image and dumps it to file.
-
-
-
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
-
-