use of org.activityinfo.legacy.shared.exception.ReportModelException in project activityinfo by bedatadriven.
the class ChartRendererJC method renderImage.
public BufferedImage renderImage(PivotChartReportElement element, boolean includeTitle, int width, int height, int dpi) {
try {
Chart chart = createChart(element, includeTitle, width, height, dpi);
BufferedImage bufferedImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
chart.setGraphics2D(bufferedImage.createGraphics());
chart.render();
return bufferedImage;
} catch (IOException e) {
throw new ReportModelException(e, element);
} catch (ChartDataException e) {
throw new ReportModelException(e, element);
} catch (PropertyException e) {
throw new ReportModelException(e, element);
}
}
Aggregations