use of org.krysalis.jcharts.chartData.DataSeries in project activityinfo by bedatadriven.
the class ChartRendererJC method createAxisChart.
protected Chart createAxisChart(PivotChartReportElement element, boolean includeTitle, int width, int height, int dpi) throws IOException, ChartDataException, PropertyException {
PivotTableData table = element.getContent().getData();
// find our categories and series leaves
List<PivotTableData.Axis> categories = table.getRootRow().getLeaves();
List<PivotTableData.Axis> series = table.getRootColumn().getLeaves();
IAxisDataSeries dataSeries = new DataSeries(toLabelArray(element.getContent(), categories), element.getContent().getXAxisTitle(), element.getContent().getYAxisTitle(), includeTitle ? element.getTitle() : null);
dataSeries.addIAxisPlotDataSet(new AxisChartDataSet(toDataArray(categories, series), toLabelArray(element.getContent(), series), computePaints(series), computeChartType(element), computeAxisChartProperties(dpi, element)));
return new AxisChart(dataSeries, computeChartProperties(dpi), computeAxisProperties(dpi, element.getContent()), computeLegendProperties(element, dpi, series), width, height);
}
Aggregations