new AxisChartDataSet( _data, _legendLabels, paints, ChartType.LINE, lineChartProperties );
dataSeries.addIAxisPlotDataSet(axisChartDataSet);
ChartProperties chartProperties= new ChartProperties();
LabelAxisProperties xaxis = new LabelAxisProperties();
DataAxisProperties yaxis = new DataAxisProperties();
yaxis.setUseCommas(showGrouping);
if (legendFont != null) {
yaxis.setAxisTitleChartFont(new ChartFont(legendFont, new Color(20)));
yaxis.setScaleChartFont(new ChartFont(legendFont, new Color(20)));
xaxis.setAxisTitleChartFont(new ChartFont(legendFont, new Color(20)));
xaxis.setScaleChartFont(new ChartFont(legendFont, new Color(20)));
}
if (titleFont != null) {
chartProperties.setTitleFont(new ChartFont(titleFont, new Color(0)));
}
// Y Axis ruler
try {
double numInterval = _height / 50d; // ~a tic every 50 px
double incrYAxis = max / numInterval;
double incrTopValue = _incrScaleYAxis;
if (_incrScaleYAxis == 0) {
incrTopValue = getTopValue(incrYAxis, BigDecimal.ROUND_HALF_UP);
}
if (incrTopValue < 1) {
incrTopValue = 1.0d; // Increment cannot be < 1
}
yaxis.setUserDefinedScale(0, incrTopValue);
yaxis.setNumItems((int)(max / incrTopValue) + 1);
yaxis.setShowGridLines(1);
} catch (PropertyException e) {
log.warn("",e);
}
AxisProperties axisProperties= new AxisProperties(xaxis, yaxis);