chart.setEvaluationGroup(jrGroupChart);
return chart;
}
protected void interpeterOptions(DJChart djChart, JRDesignChart chart) {
DJChartOptions options = djChart.getOptions();
//size
if (options.isCentered())
chart.setWidth(getReport().getOptions().getPrintableWidth());
else
chart.setWidth(options.getWidth());
chart.setHeight(options.getHeight());
//position
chart.setX(options.getX());
chart.setPadding(10);
chart.setY(options.getY());
//options
chart.setShowLegend(options.isShowLegend());
chart.setBackcolor(options.getBackColor());
chart.setBorder(options.getBorder());
//colors
if (options.getColors() != null){
int i = 1;
for (Iterator iter = options.getColors().iterator(); iter.hasNext();i++) {
Color color = (Color) iter.next();
chart.getPlot().getSeriesColors().add(new JRBaseChartPlot.JRBaseSeriesColor(i, color));
}
}
//Chart-dependent options
if (djChart.getType() == DJChart.BAR_CHART)
((JRDesignBarPlot) chart.getPlot()).setShowTickLabels(options.isShowLabels());
}