Example usage for org.jfree.chart.renderer.xy XYLineAndShapeRenderer setBaseShapesVisible

List of usage examples for org.jfree.chart.renderer.xy XYLineAndShapeRenderer setBaseShapesVisible

Introduction

In this page you can find the example usage for org.jfree.chart.renderer.xy XYLineAndShapeRenderer setBaseShapesVisible.

Prototype

public void setBaseShapesVisible(boolean flag) 

Source Link

Document

Sets the base 'shapes visible' flag and sends a RendererChangeEvent to all registered listeners.

Usage

From source file:net.sf.fspdfs.chartthemes.spring.GenericChartTheme.java

protected JFreeChart createXyLineChart() throws JRException {
    JRLinePlot linePlot = (JRLinePlot) getPlot();

    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createXYLineChart(
            (String) evaluateExpression(getChart().getTitleExpression()),
            (String) evaluateExpression(linePlot.getCategoryAxisLabelExpression()),
            (String) evaluateExpression(linePlot.getValueAxisLabelExpression()), (XYDataset) getDataset(),
            linePlot.getOrientation(), isShowLegend(), true, false);

    configureChart(jfreeChart, getPlot());

    // Handle the axis formating for the category axis
    configureAxis(jfreeChart.getXYPlot().getDomainAxis(), linePlot.getCategoryAxisLabelFont(),
            linePlot.getCategoryAxisLabelColor(), linePlot.getCategoryAxisTickLabelFont(),
            linePlot.getCategoryAxisTickLabelColor(), linePlot.getCategoryAxisTickLabelMask(),
            linePlot.getCategoryAxisVerticalTickLabels(), linePlot.getOwnCategoryAxisLineColor(), false,
            (Comparable) evaluateExpression(linePlot.getDomainAxisMinValueExpression()),
            (Comparable) evaluateExpression(linePlot.getDomainAxisMaxValueExpression()));

    // Handle the axis formating for the value axis
    configureAxis(jfreeChart.getXYPlot().getRangeAxis(), linePlot.getValueAxisLabelFont(),
            linePlot.getValueAxisLabelColor(), linePlot.getValueAxisTickLabelFont(),
            linePlot.getValueAxisTickLabelColor(), linePlot.getValueAxisTickLabelMask(),
            linePlot.getValueAxisVerticalTickLabels(), linePlot.getOwnValueAxisLineColor(), true,
            (Comparable) evaluateExpression(linePlot.getRangeAxisMinValueExpression()),
            (Comparable) evaluateExpression(linePlot.getRangeAxisMaxValueExpression()));

    XYLineAndShapeRenderer lineRenderer = (XYLineAndShapeRenderer) jfreeChart.getXYPlot().getRenderer();
    boolean isShowShapes = linePlot.getShowShapes() == null ? true : linePlot.getShowShapes().booleanValue();
    boolean isShowLines = linePlot.getShowLines() == null ? true : linePlot.getShowLines().booleanValue();
    lineRenderer.setBaseShapesVisible(isShowShapes);
    lineRenderer.setBaseLinesVisible(isShowLines);

    return jfreeChart;
}

From source file:net.sf.fspdfs.chartthemes.simple.SimpleChartTheme.java

protected JFreeChart createXyLineChart() throws JRException {
    JRLinePlot linePlot = (JRLinePlot) getPlot();

    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createXYLineChart(
            (String) evaluateExpression(getChart().getTitleExpression()),
            (String) evaluateExpression(linePlot.getCategoryAxisLabelExpression()),
            (String) evaluateExpression(linePlot.getValueAxisLabelExpression()), (XYDataset) getDataset(),
            linePlot.getOrientation(), isShowLegend(), true, false);

    configureChart(jfreeChart, getPlot());

    // Handle the axis formating for the category axis
    configureAxis(jfreeChart.getXYPlot().getDomainAxis(), linePlot.getCategoryAxisLabelFont(),
            linePlot.getCategoryAxisLabelColor(), linePlot.getCategoryAxisTickLabelFont(),
            linePlot.getCategoryAxisTickLabelColor(), linePlot.getCategoryAxisTickLabelMask(),
            linePlot.getCategoryAxisVerticalTickLabels(), linePlot.getOwnCategoryAxisLineColor(),
            getDomainAxisSettings(),//from   w w w  . j a  va  2  s  .  c om
            (Comparable) evaluateExpression(linePlot.getDomainAxisMinValueExpression()),
            (Comparable) evaluateExpression(linePlot.getDomainAxisMaxValueExpression()));

    // Handle the axis formating for the value axis
    configureAxis(jfreeChart.getXYPlot().getRangeAxis(), linePlot.getValueAxisLabelFont(),
            linePlot.getValueAxisLabelColor(), linePlot.getValueAxisTickLabelFont(),
            linePlot.getValueAxisTickLabelColor(), linePlot.getValueAxisTickLabelMask(),
            linePlot.getValueAxisVerticalTickLabels(), linePlot.getOwnValueAxisLineColor(),
            getRangeAxisSettings(), (Comparable) evaluateExpression(linePlot.getRangeAxisMinValueExpression()),
            (Comparable) evaluateExpression(linePlot.getRangeAxisMaxValueExpression()));

    XYLineAndShapeRenderer lineRenderer = (XYLineAndShapeRenderer) jfreeChart.getXYPlot().getRenderer();
    boolean isShowShapes = linePlot.getShowShapes() == null ? true : linePlot.getShowShapes().booleanValue();
    boolean isShowLines = linePlot.getShowLines() == null ? true : linePlot.getShowLines().booleanValue();
    lineRenderer.setBaseShapesVisible(isShowShapes);
    lineRenderer.setBaseLinesVisible(isShowLines);

    return jfreeChart;
}

From source file:net.sf.fspdfs.chartthemes.spring.GenericChartTheme.java

protected JFreeChart createTimeSeriesChart() throws JRException {
    String timeAxisLabel = (String) evaluateExpression(
            ((JRTimeSeriesPlot) getPlot()).getTimeAxisLabelExpression());
    String valueAxisLabel = (String) evaluateExpression(
            ((JRTimeSeriesPlot) getPlot()).getValueAxisLabelExpression());

    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createTimeSeriesChart(
            (String) evaluateExpression(getChart().getTitleExpression()), timeAxisLabel, valueAxisLabel,
            (TimeSeriesCollection) getDataset(), isShowLegend(), true, false);

    configureChart(jfreeChart, getPlot());

    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRTimeSeriesPlot timeSeriesPlot = (JRTimeSeriesPlot) getPlot();

    XYLineAndShapeRenderer lineRenderer = (XYLineAndShapeRenderer) xyPlot.getRenderer();

    boolean isShowShapes = timeSeriesPlot.getShowShapes() == null ? true
            : timeSeriesPlot.getShowShapes().booleanValue();
    boolean isShowLines = timeSeriesPlot.getShowLines() == null ? true
            : timeSeriesPlot.getShowLines().booleanValue();
    lineRenderer.setBaseLinesVisible(isShowLines);
    lineRenderer.setBaseShapesVisible(isShowShapes);

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), timeSeriesPlot.getTimeAxisLabelFont(),
            timeSeriesPlot.getTimeAxisLabelColor(), timeSeriesPlot.getTimeAxisTickLabelFont(),
            timeSeriesPlot.getTimeAxisTickLabelColor(), timeSeriesPlot.getTimeAxisTickLabelMask(),
            timeSeriesPlot.getTimeAxisVerticalTickLabels(), timeSeriesPlot.getOwnTimeAxisLineColor(), false,
            (Comparable) evaluateExpression(timeSeriesPlot.getDomainAxisMinValueExpression()),
            (Comparable) evaluateExpression(timeSeriesPlot.getDomainAxisMaxValueExpression()));

    // Handle the axis formating for the value axis
    configureAxis(xyPlot.getRangeAxis(), timeSeriesPlot.getValueAxisLabelFont(),
            timeSeriesPlot.getValueAxisLabelColor(), timeSeriesPlot.getValueAxisTickLabelFont(),
            timeSeriesPlot.getValueAxisTickLabelColor(), timeSeriesPlot.getValueAxisTickLabelMask(),
            timeSeriesPlot.getValueAxisVerticalTickLabels(), timeSeriesPlot.getOwnValueAxisLineColor(), true,
            (Comparable) evaluateExpression(timeSeriesPlot.getRangeAxisMinValueExpression()),
            (Comparable) evaluateExpression(timeSeriesPlot.getRangeAxisMaxValueExpression()));

    return jfreeChart;
}

From source file:net.sf.fspdfs.chartthemes.simple.SimpleChartTheme.java

protected JFreeChart createTimeSeriesChart() throws JRException {
    String timeAxisLabel = (String) evaluateExpression(
            ((JRTimeSeriesPlot) getPlot()).getTimeAxisLabelExpression());
    String valueAxisLabel = (String) evaluateExpression(
            ((JRTimeSeriesPlot) getPlot()).getValueAxisLabelExpression());

    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createTimeSeriesChart(
            (String) evaluateExpression(getChart().getTitleExpression()), timeAxisLabel, valueAxisLabel,
            (TimeSeriesCollection) getDataset(), isShowLegend(), true, false);

    configureChart(jfreeChart, getPlot());

    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRTimeSeriesPlot timeSeriesPlot = (JRTimeSeriesPlot) getPlot();

    XYLineAndShapeRenderer lineRenderer = (XYLineAndShapeRenderer) xyPlot.getRenderer();

    boolean isShowShapes = timeSeriesPlot.getShowShapes() == null ? true
            : timeSeriesPlot.getShowShapes().booleanValue();
    boolean isShowLines = timeSeriesPlot.getShowLines() == null ? true
            : timeSeriesPlot.getShowLines().booleanValue();
    lineRenderer.setBaseLinesVisible(isShowLines);
    lineRenderer.setBaseShapesVisible(isShowShapes);

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), timeSeriesPlot.getTimeAxisLabelFont(),
            timeSeriesPlot.getTimeAxisLabelColor(), timeSeriesPlot.getTimeAxisTickLabelFont(),
            timeSeriesPlot.getTimeAxisTickLabelColor(), timeSeriesPlot.getTimeAxisTickLabelMask(),
            timeSeriesPlot.getTimeAxisVerticalTickLabels(), timeSeriesPlot.getOwnTimeAxisLineColor(),
            getDomainAxisSettings(), DateTickUnit.DAY,
            (Comparable) evaluateExpression(timeSeriesPlot.getDomainAxisMinValueExpression()),
            (Comparable) evaluateExpression(timeSeriesPlot.getDomainAxisMaxValueExpression()));

    // Handle the axis formating for the value axis
    configureAxis(xyPlot.getRangeAxis(), timeSeriesPlot.getValueAxisLabelFont(),
            timeSeriesPlot.getValueAxisLabelColor(), timeSeriesPlot.getValueAxisTickLabelFont(),
            timeSeriesPlot.getValueAxisTickLabelColor(), timeSeriesPlot.getValueAxisTickLabelMask(),
            timeSeriesPlot.getValueAxisVerticalTickLabels(), timeSeriesPlot.getOwnValueAxisLineColor(),
            getRangeAxisSettings(), DateTickUnit.DAY,
            (Comparable) evaluateExpression(timeSeriesPlot.getRangeAxisMinValueExpression()),
            (Comparable) evaluateExpression(timeSeriesPlot.getRangeAxisMaxValueExpression()));

    return jfreeChart;
}

From source file:net.sf.jasperreports.chartthemes.spring.GenericChartTheme.java

protected JFreeChart createXyLineChart() throws JRException {
    JRLinePlot linePlot = (JRLinePlot) getPlot();

    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createXYLineChart(
            evaluateTextExpression(getChart().getTitleExpression()),
            evaluateTextExpression(linePlot.getCategoryAxisLabelExpression()),
            evaluateTextExpression(linePlot.getValueAxisLabelExpression()), (XYDataset) getDataset(),
            linePlot.getOrientationValue().getOrientation(), isShowLegend(), true, false);

    configureChart(jfreeChart, getPlot());

    // Handle the axis formating for the category axis
    configureAxis(jfreeChart.getXYPlot().getDomainAxis(), linePlot.getCategoryAxisLabelFont(),
            linePlot.getCategoryAxisLabelColor(), linePlot.getCategoryAxisTickLabelFont(),
            linePlot.getCategoryAxisTickLabelColor(), linePlot.getCategoryAxisTickLabelMask(),
            linePlot.getCategoryAxisVerticalTickLabels(), linePlot.getOwnCategoryAxisLineColor(), false,
            (Comparable<?>) evaluateExpression(linePlot.getDomainAxisMinValueExpression()),
            (Comparable<?>) evaluateExpression(linePlot.getDomainAxisMaxValueExpression()));

    // Handle the axis formating for the value axis
    configureAxis(jfreeChart.getXYPlot().getRangeAxis(), linePlot.getValueAxisLabelFont(),
            linePlot.getValueAxisLabelColor(), linePlot.getValueAxisTickLabelFont(),
            linePlot.getValueAxisTickLabelColor(), linePlot.getValueAxisTickLabelMask(),
            linePlot.getValueAxisVerticalTickLabels(), linePlot.getOwnValueAxisLineColor(), true,
            (Comparable<?>) evaluateExpression(linePlot.getRangeAxisMinValueExpression()),
            (Comparable<?>) evaluateExpression(linePlot.getRangeAxisMaxValueExpression()));

    XYLineAndShapeRenderer lineRenderer = (XYLineAndShapeRenderer) jfreeChart.getXYPlot().getRenderer();
    boolean isShowShapes = linePlot.getShowShapes() == null ? true : linePlot.getShowShapes();
    boolean isShowLines = linePlot.getShowLines() == null ? true : linePlot.getShowLines();
    lineRenderer.setBaseShapesVisible(isShowShapes);
    lineRenderer.setBaseLinesVisible(isShowLines);

    return jfreeChart;
}

From source file:net.sf.fspdfs.chartthemes.spring.GenericChartTheme.java

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, getPlot());
    XYLineAndShapeRenderer plotRenderer = (XYLineAndShapeRenderer) ((XYPlot) jfreeChart.getPlot())
            .getRenderer();//from w  ww.  j  a  v a 2 s . c  om

    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.getOwnXAxisLineColor(), 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.getOwnYAxisLineColor(), true,
            (Comparable) evaluateExpression(scatterPlot.getRangeAxisMinValueExpression()),
            (Comparable) evaluateExpression(scatterPlot.getRangeAxisMaxValueExpression()));

    return jfreeChart;
}

From source file:net.sf.jasperreports.chartthemes.simple.SimpleChartTheme.java

protected JFreeChart createXyLineChart() throws JRException {
    JRLinePlot linePlot = (JRLinePlot) getPlot();

    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createXYLineChart(
            evaluateTextExpression(getChart().getTitleExpression()),
            evaluateTextExpression(linePlot.getCategoryAxisLabelExpression()),
            evaluateTextExpression(linePlot.getValueAxisLabelExpression()), (XYDataset) getDataset(),
            linePlot.getOrientationValue().getOrientation(), isShowLegend(), true, false);

    configureChart(jfreeChart, getPlot());

    // Handle the axis formating for the category axis
    configureAxis(jfreeChart.getXYPlot().getDomainAxis(), linePlot.getCategoryAxisLabelFont(),
            linePlot.getCategoryAxisLabelColor(), linePlot.getCategoryAxisTickLabelFont(),
            linePlot.getCategoryAxisTickLabelColor(), linePlot.getCategoryAxisTickLabelMask(),
            linePlot.getCategoryAxisVerticalTickLabels(), linePlot.getOwnCategoryAxisLineColor(),
            getDomainAxisSettings(),/* w w w .j  a  v a  2s .  c o m*/
            (Comparable<?>) evaluateExpression(linePlot.getDomainAxisMinValueExpression()),
            (Comparable<?>) evaluateExpression(linePlot.getDomainAxisMaxValueExpression()));

    // Handle the axis formating for the value axis
    configureAxis(jfreeChart.getXYPlot().getRangeAxis(), linePlot.getValueAxisLabelFont(),
            linePlot.getValueAxisLabelColor(), linePlot.getValueAxisTickLabelFont(),
            linePlot.getValueAxisTickLabelColor(), linePlot.getValueAxisTickLabelMask(),
            linePlot.getValueAxisVerticalTickLabels(), linePlot.getOwnValueAxisLineColor(),
            getRangeAxisSettings(),
            (Comparable<?>) evaluateExpression(linePlot.getRangeAxisMinValueExpression()),
            (Comparable<?>) evaluateExpression(linePlot.getRangeAxisMaxValueExpression()));

    XYLineAndShapeRenderer lineRenderer = (XYLineAndShapeRenderer) jfreeChart.getXYPlot().getRenderer();
    boolean isShowShapes = linePlot.getShowShapes() == null ? true : linePlot.getShowShapes();
    boolean isShowLines = linePlot.getShowLines() == null ? true : linePlot.getShowLines();
    lineRenderer.setBaseShapesVisible(isShowShapes);
    lineRenderer.setBaseLinesVisible(isShowLines);

    return jfreeChart;
}

From source file:net.sf.jasperreports.chartthemes.spring.GenericChartTheme.java

protected JFreeChart createTimeSeriesChart() throws JRException {
    String timeAxisLabel = evaluateTextExpression(((JRTimeSeriesPlot) getPlot()).getTimeAxisLabelExpression());
    String valueAxisLabel = evaluateTextExpression(
            ((JRTimeSeriesPlot) getPlot()).getValueAxisLabelExpression());

    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createTimeSeriesChart(
            evaluateTextExpression(getChart().getTitleExpression()), timeAxisLabel, valueAxisLabel,
            (TimeSeriesCollection) getDataset(), isShowLegend(), true, false);

    configureChart(jfreeChart, getPlot());

    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRTimeSeriesPlot timeSeriesPlot = (JRTimeSeriesPlot) getPlot();

    XYLineAndShapeRenderer lineRenderer = (XYLineAndShapeRenderer) xyPlot.getRenderer();

    boolean isShowShapes = timeSeriesPlot.getShowShapes() == null ? true : timeSeriesPlot.getShowShapes();
    boolean isShowLines = timeSeriesPlot.getShowLines() == null ? true : timeSeriesPlot.getShowLines();
    lineRenderer.setBaseLinesVisible(isShowLines);
    lineRenderer.setBaseShapesVisible(isShowShapes);

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), timeSeriesPlot.getTimeAxisLabelFont(),
            timeSeriesPlot.getTimeAxisLabelColor(), timeSeriesPlot.getTimeAxisTickLabelFont(),
            timeSeriesPlot.getTimeAxisTickLabelColor(), timeSeriesPlot.getTimeAxisTickLabelMask(),
            timeSeriesPlot.getTimeAxisVerticalTickLabels(), timeSeriesPlot.getOwnTimeAxisLineColor(), false,
            (Comparable<?>) evaluateExpression(timeSeriesPlot.getDomainAxisMinValueExpression()),
            (Comparable<?>) evaluateExpression(timeSeriesPlot.getDomainAxisMaxValueExpression()));

    // Handle the axis formating for the value axis
    configureAxis(xyPlot.getRangeAxis(), timeSeriesPlot.getValueAxisLabelFont(),
            timeSeriesPlot.getValueAxisLabelColor(), timeSeriesPlot.getValueAxisTickLabelFont(),
            timeSeriesPlot.getValueAxisTickLabelColor(), timeSeriesPlot.getValueAxisTickLabelMask(),
            timeSeriesPlot.getValueAxisVerticalTickLabels(), timeSeriesPlot.getOwnValueAxisLineColor(), true,
            (Comparable<?>) evaluateExpression(timeSeriesPlot.getRangeAxisMinValueExpression()),
            (Comparable<?>) evaluateExpression(timeSeriesPlot.getRangeAxisMaxValueExpression()));

    return jfreeChart;
}

From source file:net.sf.fspdfs.chartthemes.simple.SimpleChartTheme.java

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, getPlot());
    XYLineAndShapeRenderer plotRenderer = (XYLineAndShapeRenderer) ((XYPlot) jfreeChart.getPlot())
            .getRenderer();/*w w  w.j a v a  2  s .com*/

    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.getOwnXAxisLineColor(),
            getDomainAxisSettings(),
            (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.getOwnYAxisLineColor(),
            getRangeAxisSettings(),
            (Comparable) evaluateExpression(scatterPlot.getRangeAxisMinValueExpression()),
            (Comparable) evaluateExpression(scatterPlot.getRangeAxisMaxValueExpression()));

    return jfreeChart;
}

From source file:net.sf.jasperreports.chartthemes.simple.SimpleChartTheme.java

protected JFreeChart createTimeSeriesChart() throws JRException {
    String timeAxisLabel = evaluateTextExpression(((JRTimeSeriesPlot) getPlot()).getTimeAxisLabelExpression());
    String valueAxisLabel = evaluateTextExpression(
            ((JRTimeSeriesPlot) getPlot()).getValueAxisLabelExpression());

    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createTimeSeriesChart(
            evaluateTextExpression(getChart().getTitleExpression()), timeAxisLabel, valueAxisLabel,
            (TimeSeriesCollection) getDataset(), isShowLegend(), true, false);

    configureChart(jfreeChart, getPlot());

    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRTimeSeriesPlot timeSeriesPlot = (JRTimeSeriesPlot) getPlot();

    XYLineAndShapeRenderer lineRenderer = (XYLineAndShapeRenderer) xyPlot.getRenderer();

    boolean isShowShapes = timeSeriesPlot.getShowShapes() == null ? true : timeSeriesPlot.getShowShapes();
    boolean isShowLines = timeSeriesPlot.getShowLines() == null ? true : timeSeriesPlot.getShowLines();
    lineRenderer.setBaseLinesVisible(isShowLines);
    lineRenderer.setBaseShapesVisible(isShowShapes);

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), timeSeriesPlot.getTimeAxisLabelFont(),
            timeSeriesPlot.getTimeAxisLabelColor(), timeSeriesPlot.getTimeAxisTickLabelFont(),
            timeSeriesPlot.getTimeAxisTickLabelColor(), timeSeriesPlot.getTimeAxisTickLabelMask(),
            timeSeriesPlot.getTimeAxisVerticalTickLabels(), timeSeriesPlot.getOwnTimeAxisLineColor(),
            getDomainAxisSettings(), DateTickUnitType.DAY,
            (Comparable<?>) evaluateExpression(timeSeriesPlot.getDomainAxisMinValueExpression()),
            (Comparable<?>) evaluateExpression(timeSeriesPlot.getDomainAxisMaxValueExpression()));

    // Handle the axis formating for the value axis
    configureAxis(xyPlot.getRangeAxis(), timeSeriesPlot.getValueAxisLabelFont(),
            timeSeriesPlot.getValueAxisLabelColor(), timeSeriesPlot.getValueAxisTickLabelFont(),
            timeSeriesPlot.getValueAxisTickLabelColor(), timeSeriesPlot.getValueAxisTickLabelMask(),
            timeSeriesPlot.getValueAxisVerticalTickLabels(), timeSeriesPlot.getOwnValueAxisLineColor(),
            getRangeAxisSettings(), DateTickUnitType.DAY,
            (Comparable<?>) evaluateExpression(timeSeriesPlot.getRangeAxisMinValueExpression()),
            (Comparable<?>) evaluateExpression(timeSeriesPlot.getRangeAxisMaxValueExpression()));

    return jfreeChart;
}