Interface ChartTheme

  • All Known Implementing Classes:
    AegeanChartTheme, DefaultChartTheme, EyeCandySixtiesChartTheme, GenericChartTheme, SimpleChartTheme, XmlChartTheme

    public interface ChartTheme
    Chart themes give more control over chart output, including the creation of the JFreeChart object itself. Also, chart themes affect a whole range of chart types across multiple reports and are not necessarily tied to a specific chart element within a report. They can even apply globally to all charts within a given JasperReports deployment, applying a new look and feel to all charts created.
    A chart theme can be set globally using a configuration property within the jasperreports.properties file as follows:

    net.sf.jasperreports.chart.theme=<theme_name>

    The global chart theme can be overridden at report level using the following report property in the report template:

    <property name="net.sf.jasperreports.chart.theme" value="<theme_name>"/>

    If needed, at chart element level, the chart theme is specified using the theme attribute.
    Author:
    Teodor Danciu (teodord@users.sourceforge.net)
    • Method Detail

      • createChart

        org.jfree.chart.JFreeChart createChart​(ChartContext chartContext)
                                        throws JRException
        Returns:
        an org.jfree.chart.JFreeChart object representing the chart
        Throws:
        JRException