protected JFreeChart createScatterChart() throws JRException
{
ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
JFreeChart jfreeChart = ChartFactory.createScatterPlot(
(String)evaluateExpression(getChart().getTitleExpression()),
(String)evaluateExpression(((JRScatterPlot)getPlot()).getXAxisLabelExpression()),
(String)evaluateExpression(((JRScatterPlot)getPlot()).getYAxisLabelExpression() ),
(XYDataset)getDataset(),
getPlot().getOrientation(),
isShowLegend(),
true,
false);
configureChart(jfreeChart);
XYLineAndShapeRenderer plotRenderer = (XYLineAndShapeRenderer) ((XYPlot)jfreeChart.getPlot()).getRenderer();
JRScatterPlot scatterPlot = (JRScatterPlot) getPlot();
boolean isShowLines = scatterPlot.getShowLines() == null ? true : scatterPlot.getShowLines().booleanValue();
boolean isShowShapes = scatterPlot.getShowShapes() == null ? true : scatterPlot.getShowShapes().booleanValue();
plotRenderer.setBaseLinesVisible(isShowLines);
plotRenderer.setBaseShapesVisible(isShowShapes);
// Handle the axis formating for the category axis
configureAxis(jfreeChart.getXYPlot().getDomainAxis(), scatterPlot.getXAxisLabelFont(),
scatterPlot.getXAxisLabelColor(), scatterPlot.getXAxisTickLabelFont(),
scatterPlot.getXAxisTickLabelColor(), scatterPlot.getXAxisTickLabelMask(), scatterPlot.getXAxisVerticalTickLabels(),
scatterPlot.getXAxisLineColor(), false,
(Comparable)evaluateExpression(scatterPlot.getDomainAxisMinValueExpression()),
(Comparable)evaluateExpression(scatterPlot.getDomainAxisMaxValueExpression()));
// Handle the axis formating for the value axis
configureAxis(jfreeChart.getXYPlot().getRangeAxis(), scatterPlot.getYAxisLabelFont(),
scatterPlot.getYAxisLabelColor(), scatterPlot.getYAxisTickLabelFont(),
scatterPlot.getYAxisTickLabelColor(), scatterPlot.getYAxisTickLabelMask(), scatterPlot.getYAxisVerticalTickLabels(),
scatterPlot.getYAxisLineColor(), true,
(Comparable)evaluateExpression(scatterPlot.getRangeAxisMinValueExpression()),
(Comparable)evaluateExpression(scatterPlot.getRangeAxisMaxValueExpression()));