use of org.devgateway.toolkit.web.excelcharts.ExcelChartDefault in project oc-explorer by devgateway.
the class ExcelChartGenerator method getExcelChart.
/**
* Generate an Excel Chart based on (categories, values)
*/
@Cacheable
public byte[] getExcelChart(final ChartType type, final String title, final List<String> seriesTitle, final List<?> categories, final List<List<? extends Number>> values) throws IOException {
final ExcelChart excelChart = new ExcelChartDefault(title, type, categories, values);
excelChart.configureSeriesTitle(seriesTitle);
final Workbook workbook = excelChart.createWorkbook();
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
workbook.write(baos);
return baos.toByteArray();
}
use of org.devgateway.toolkit.web.excelcharts.ExcelChartDefault in project ocvn by devgateway.
the class ExcelChartGenerator method getExcelChart.
/**
* Generate an Excel Chart based on (categories, values)
*/
@Cacheable
public byte[] getExcelChart(final ChartType type, final String title, final List<String> seriesTitle, final List<?> categories, final List<List<? extends Number>> values) throws IOException {
final ExcelChart excelChart = new ExcelChartDefault(title, type, categories, values);
excelChart.configureSeriesTitle(seriesTitle);
final Workbook workbook = excelChart.createWorkbook();
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
workbook.write(baos);
return baos.toByteArray();
}
Aggregations