Search in sources :

Example 1 with IAxisDataSeries

use of org.krysalis.jcharts.chartData.interfaces.IAxisDataSeries 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);
}
Also used : AxisChart(org.krysalis.jcharts.axisChart.AxisChart) PivotTableData(org.activityinfo.legacy.shared.reports.content.PivotTableData) IAxisDataSeries(org.krysalis.jcharts.chartData.interfaces.IAxisDataSeries) DataSeries(org.krysalis.jcharts.chartData.DataSeries) IAxisDataSeries(org.krysalis.jcharts.chartData.interfaces.IAxisDataSeries) AxisChartDataSet(org.krysalis.jcharts.chartData.AxisChartDataSet)

Aggregations

PivotTableData (org.activityinfo.legacy.shared.reports.content.PivotTableData)1 AxisChart (org.krysalis.jcharts.axisChart.AxisChart)1 AxisChartDataSet (org.krysalis.jcharts.chartData.AxisChartDataSet)1 DataSeries (org.krysalis.jcharts.chartData.DataSeries)1 IAxisDataSeries (org.krysalis.jcharts.chartData.interfaces.IAxisDataSeries)1