Using Templates in Jasper Reports

I am trying to create a chart theme for my Jasper reports so that all brands are branded for the company.

So far, I have been able to discover that the default theme of the chart is set to

  jasperreports.properties 
using the following property:
  net.sf.jasperreports.chart.theme = default.spring 

I also found an example of themes graph application in jasper reports, but there seems to be no documentation with it.

I also see that to use the property

  jasperreports_extension.properties 
The following property must be specified:
  net.sf.jasperreports.extension.registry.factory.chart.theme 
however, there appears to be no documentation or tutorials on the actual use of this property.

Does anyone have experience using charting topics or information on any documentation, blog posts, etc. that I will be helpful?

+4
source share
1 answer

I had the same question today.

A topic is defined in XML as follows:

<timeSeriesChart> <chart hyperlinkType="None" theme="eye.candy.sixties"> .... </timeSeriesChart> 

To truly provide this theme, a .jar included in the classpath must provide a ChartThemeBundle singleton instance that returns a subclass of ChartTheme .

A subclass of ChartTheme should then implement a whole bunch of methods.

Probably the best approach is to download the JasperReports source code ( http://sourceforge.net/projects/jasperreports/files/ ) and look in the directory:

 demo/samples/charts/src/net/sf/jasperreports/charts/themes/ 

Then select a topic to extend, subclass, and implement the methods you care about.

+2
source

All Articles