Example usage for org.jfree.chart ChartFactory setChartTheme

List of usage examples for org.jfree.chart ChartFactory setChartTheme

Introduction

In this page you can find the example usage for org.jfree.chart ChartFactory setChartTheme.

Prototype

public static void setChartTheme(ChartTheme theme) 

Source Link

Document

Sets the current chart theme.

Usage

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

/**
 *
 * @param evaluation/* w  ww  . j a va 2s  . c om*/
 * @throws net.sf.fspdfs.engine.JRException
 */
protected JFreeChart createCandlestickChart() throws JRException {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createCandlestickChart(
            (String) evaluateExpression(getChart().getTitleExpression()),
            (String) evaluateExpression(((JRCandlestickPlot) getPlot()).getTimeAxisLabelExpression()),
            (String) evaluateExpression(((JRCandlestickPlot) getPlot()).getValueAxisLabelExpression()),
            (DefaultHighLowDataset) getDataset(), isShowLegend());

    configureChart(jfreeChart, getPlot());

    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRCandlestickPlot candlestickPlot = (JRCandlestickPlot) getPlot();
    CandlestickRenderer candlestickRenderer = (CandlestickRenderer) xyPlot.getRenderer();
    boolean isShowVolume = candlestickPlot.getShowVolume() == null ? true
            : candlestickPlot.getShowVolume().booleanValue();
    candlestickRenderer.setDrawVolume(isShowVolume);

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

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

    return jfreeChart;
}

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

protected JFreeChart createBubbleChart() throws JRException {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createBubbleChart(
            evaluateTextExpression(getChart().getTitleExpression()),
            evaluateTextExpression(((JRBubblePlot) getPlot()).getXAxisLabelExpression()),
            evaluateTextExpression(((JRBubblePlot) getPlot()).getYAxisLabelExpression()),
            (XYZDataset) getDataset(), getPlot().getOrientationValue().getOrientation(), isShowLegend(), true,
            false);//from  w ww  .j  a  v  a  2s. c o m

    configureChart(jfreeChart, getPlot());

    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRBubblePlot bubblePlot = (JRBubblePlot) getPlot();
    int scaleType = bubblePlot.getScaleTypeValue() == null ? ScaleTypeEnum.ON_RANGE_AXIS.getValue()
            : bubblePlot.getScaleTypeValue().getValue();
    XYBubbleRenderer bubbleRenderer = new XYBubbleRenderer(scaleType);
    xyPlot.setRenderer(bubbleRenderer);

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), bubblePlot.getXAxisLabelFont(), bubblePlot.getXAxisLabelColor(),
            bubblePlot.getXAxisTickLabelFont(), bubblePlot.getXAxisTickLabelColor(),
            bubblePlot.getXAxisTickLabelMask(), bubblePlot.getXAxisVerticalTickLabels(),
            bubblePlot.getOwnXAxisLineColor(), false,
            (Comparable<?>) evaluateExpression(bubblePlot.getDomainAxisMinValueExpression()),
            (Comparable<?>) evaluateExpression(bubblePlot.getDomainAxisMaxValueExpression()));

    // Handle the axis formating for the value axis
    configureAxis(xyPlot.getRangeAxis(), bubblePlot.getYAxisLabelFont(), bubblePlot.getYAxisLabelColor(),
            bubblePlot.getYAxisTickLabelFont(), bubblePlot.getYAxisTickLabelColor(),
            bubblePlot.getYAxisTickLabelMask(), bubblePlot.getYAxisVerticalTickLabels(),
            bubblePlot.getOwnYAxisLineColor(), true,
            (Comparable<?>) evaluateExpression(bubblePlot.getRangeAxisMinValueExpression()),
            (Comparable<?>) evaluateExpression(bubblePlot.getRangeAxisMaxValueExpression()));

    return jfreeChart;
}

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

/**
 *
 * @param evaluation//  w  ww  . j ava  2s. c  o  m
 * @throws net.sf.fspdfs.engine.JRException
 */
protected JFreeChart createCandlestickChart() throws JRException {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createCandlestickChart(
            (String) evaluateExpression(getChart().getTitleExpression()),
            (String) evaluateExpression(((JRCandlestickPlot) getPlot()).getTimeAxisLabelExpression()),
            (String) evaluateExpression(((JRCandlestickPlot) getPlot()).getValueAxisLabelExpression()),
            (DefaultHighLowDataset) getDataset(), isShowLegend());

    configureChart(jfreeChart, getPlot());

    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRCandlestickPlot candlestickPlot = (JRCandlestickPlot) getPlot();
    CandlestickRenderer candlestickRenderer = (CandlestickRenderer) xyPlot.getRenderer();
    boolean isShowVolume = candlestickPlot.getShowVolume() == null ? true
            : candlestickPlot.getShowVolume().booleanValue();
    candlestickRenderer.setDrawVolume(isShowVolume);

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

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

    return jfreeChart;
}

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

protected JFreeChart createBubbleChart() throws JRException {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createBubbleChart(
            evaluateTextExpression(getChart().getTitleExpression()),
            evaluateTextExpression(((JRBubblePlot) getPlot()).getXAxisLabelExpression()),
            evaluateTextExpression(((JRBubblePlot) getPlot()).getYAxisLabelExpression()),
            (XYZDataset) getDataset(), getPlot().getOrientationValue().getOrientation(), isShowLegend(), true,
            false);/*w  ww  .j a v a  2  s . co m*/

    configureChart(jfreeChart, getPlot());

    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRBubblePlot bubblePlot = (JRBubblePlot) getPlot();
    int scaleType = bubblePlot.getScaleTypeValue() == null ? ScaleTypeEnum.ON_RANGE_AXIS.getValue()
            : bubblePlot.getScaleTypeValue().getValue();
    XYBubbleRenderer bubbleRenderer = new XYBubbleRenderer(scaleType);
    xyPlot.setRenderer(bubbleRenderer);

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), bubblePlot.getXAxisLabelFont(), bubblePlot.getXAxisLabelColor(),
            bubblePlot.getXAxisTickLabelFont(), bubblePlot.getXAxisTickLabelColor(),
            bubblePlot.getXAxisTickLabelMask(), bubblePlot.getXAxisVerticalTickLabels(),
            bubblePlot.getOwnXAxisLineColor(), getDomainAxisSettings(),
            (Comparable<?>) evaluateExpression(bubblePlot.getDomainAxisMinValueExpression()),
            (Comparable<?>) evaluateExpression(bubblePlot.getDomainAxisMaxValueExpression()));

    // Handle the axis formating for the value axis
    configureAxis(xyPlot.getRangeAxis(), bubblePlot.getYAxisLabelFont(), bubblePlot.getYAxisLabelColor(),
            bubblePlot.getYAxisTickLabelFont(), bubblePlot.getYAxisTickLabelColor(),
            bubblePlot.getYAxisTickLabelMask(), bubblePlot.getYAxisVerticalTickLabels(),
            bubblePlot.getOwnYAxisLineColor(), getRangeAxisSettings(),
            (Comparable<?>) evaluateExpression(bubblePlot.getRangeAxisMinValueExpression()),
            (Comparable<?>) evaluateExpression(bubblePlot.getRangeAxisMaxValueExpression()));

    return jfreeChart;
}

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

/**
 *
 *///w  w  w . j a va2  s.co  m
protected JFreeChart createCandlestickChart() throws JRException {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createCandlestickChart(
            evaluateTextExpression(getChart().getTitleExpression()),
            evaluateTextExpression(((JRCandlestickPlot) getPlot()).getTimeAxisLabelExpression()),
            evaluateTextExpression(((JRCandlestickPlot) getPlot()).getValueAxisLabelExpression()),
            (DefaultHighLowDataset) getDataset(), isShowLegend());

    configureChart(jfreeChart, getPlot());

    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRCandlestickPlot candlestickPlot = (JRCandlestickPlot) getPlot();
    CandlestickRenderer candlestickRenderer = (CandlestickRenderer) xyPlot.getRenderer();
    boolean isShowVolume = candlestickPlot.getShowVolume() == null ? true : candlestickPlot.getShowVolume();
    candlestickRenderer.setDrawVolume(isShowVolume);

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

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

    return jfreeChart;
}

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

/**
 *
 * @param evaluation/* ww  w  . j  av  a  2 s . c o m*/
 * @throws JRException
 */
protected JFreeChart createHighLowChart() throws JRException {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createHighLowChart(
            (String) evaluateExpression(getChart().getTitleExpression()),
            (String) evaluateExpression(((JRHighLowPlot) getPlot()).getTimeAxisLabelExpression()),
            (String) evaluateExpression(((JRHighLowPlot) getPlot()).getValueAxisLabelExpression()),
            (DefaultHighLowDataset) getDataset(), isShowLegend());

    configureChart(jfreeChart, getPlot());
    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRHighLowPlot highLowPlot = (JRHighLowPlot) getPlot();
    HighLowRenderer hlRenderer = (HighLowRenderer) xyPlot.getRenderer();
    boolean isShowOpenTicks = highLowPlot.getShowOpenTicks() == null ? false
            : highLowPlot.getShowOpenTicks().booleanValue();
    boolean isShowCloseTicks = highLowPlot.getShowCloseTicks() == null ? false
            : highLowPlot.getShowCloseTicks().booleanValue();

    hlRenderer.setDrawOpenTicks(isShowOpenTicks);
    hlRenderer.setDrawCloseTicks(isShowCloseTicks);

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

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

    return jfreeChart;
}

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

/**
 *
 *///  w ww  .j  av  a2 s  .  c om
protected JFreeChart createCandlestickChart() throws JRException {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createCandlestickChart(
            evaluateTextExpression(getChart().getTitleExpression()),
            evaluateTextExpression(((JRCandlestickPlot) getPlot()).getTimeAxisLabelExpression()),
            evaluateTextExpression(((JRCandlestickPlot) getPlot()).getValueAxisLabelExpression()),
            (DefaultHighLowDataset) getDataset(), isShowLegend());

    configureChart(jfreeChart, getPlot());

    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRCandlestickPlot candlestickPlot = (JRCandlestickPlot) getPlot();
    CandlestickRenderer candlestickRenderer = (CandlestickRenderer) xyPlot.getRenderer();
    boolean isShowVolume = candlestickPlot.getShowVolume() == null ? true : candlestickPlot.getShowVolume();
    candlestickRenderer.setDrawVolume(isShowVolume);

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

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

    return jfreeChart;
}

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

/**
 *
 * @param evaluation/*from  w w w. ja  v  a 2  s . c o m*/
 * @throws JRException
 */
protected JFreeChart createHighLowChart() throws JRException {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createHighLowChart(
            (String) evaluateExpression(getChart().getTitleExpression()),
            (String) evaluateExpression(((JRHighLowPlot) getPlot()).getTimeAxisLabelExpression()),
            (String) evaluateExpression(((JRHighLowPlot) getPlot()).getValueAxisLabelExpression()),
            (DefaultHighLowDataset) getDataset(), isShowLegend());

    configureChart(jfreeChart, getPlot());
    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRHighLowPlot highLowPlot = (JRHighLowPlot) getPlot();
    HighLowRenderer hlRenderer = (HighLowRenderer) xyPlot.getRenderer();
    boolean isShowOpenTicks = highLowPlot.getShowOpenTicks() == null ? false
            : highLowPlot.getShowOpenTicks().booleanValue();
    boolean isShowCloseTicks = highLowPlot.getShowCloseTicks() == null ? false
            : highLowPlot.getShowCloseTicks().booleanValue();

    hlRenderer.setDrawOpenTicks(isShowOpenTicks);
    hlRenderer.setDrawCloseTicks(isShowCloseTicks);

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

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

    return jfreeChart;
}

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

/**
 *
 *///from   w  w w .j a v  a  2s . c  o  m
protected JFreeChart createHighLowChart() throws JRException {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart jfreeChart = ChartFactory.createHighLowChart(
            evaluateTextExpression(getChart().getTitleExpression()),
            evaluateTextExpression(((JRHighLowPlot) getPlot()).getTimeAxisLabelExpression()),
            evaluateTextExpression(((JRHighLowPlot) getPlot()).getValueAxisLabelExpression()),
            (DefaultHighLowDataset) getDataset(), isShowLegend());

    configureChart(jfreeChart, getPlot());
    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRHighLowPlot highLowPlot = (JRHighLowPlot) getPlot();
    HighLowRenderer hlRenderer = (HighLowRenderer) xyPlot.getRenderer();
    boolean isShowOpenTicks = highLowPlot.getShowOpenTicks() == null ? false : highLowPlot.getShowOpenTicks();
    boolean isShowCloseTicks = highLowPlot.getShowCloseTicks() == null ? false
            : highLowPlot.getShowCloseTicks();

    hlRenderer.setDrawOpenTicks(isShowOpenTicks);
    hlRenderer.setDrawCloseTicks(isShowCloseTicks);

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

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

    return jfreeChart;
}

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

protected JFreeChart createLineChart() throws JRException {
    ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
    JFreeChart freeChart = ChartFactory.createLineChart(
            (String) evaluateExpression(getChart().getTitleExpression()),
            (String) evaluateExpression(((JRLinePlot) getPlot()).getCategoryAxisLabelExpression()),
            (String) evaluateExpression(((JRLinePlot) getPlot()).getValueAxisLabelExpression()),
            (CategoryDataset) getDataset(), getPlot().getOrientation(), isShowLegend(), true, false);

    configureChart(freeChart, getPlot());

    CategoryPlot categoryPlot = (CategoryPlot) freeChart.getPlot();
    JRLinePlot linePlot = (JRLinePlot) getPlot();

    LineAndShapeRenderer lineRenderer = (LineAndShapeRenderer) categoryPlot.getRenderer();
    boolean isShowShapes = linePlot.getShowShapes() == null ? true : linePlot.getShowShapes().booleanValue();
    boolean isShowLines = linePlot.getShowLines() == null ? true : linePlot.getShowLines().booleanValue();

    lineRenderer.setBaseShapesVisible(isShowShapes);//FIXMECHART check this
    lineRenderer.setBaseLinesVisible(isShowLines);

    //FIXME labels?

    // Handle the axis formating for the category axis
    configureAxis(categoryPlot.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(categoryPlot.getRangeAxis(), linePlot.getValueAxisLabelFont(),
            linePlot.getValueAxisLabelColor(), linePlot.getValueAxisTickLabelFont(),
            linePlot.getValueAxisTickLabelColor(), linePlot.getValueAxisTickLabelMask(),
            linePlot.getValueAxisVerticalTickLabels(), linePlot.getOwnValueAxisLineColor(), true,
            (Comparable) evaluateExpression(linePlot.getRangeAxisMinValueExpression()),
            (Comparable) evaluateExpression(linePlot.getRangeAxisMaxValueExpression()));

    return freeChart;
}