Jump to content
We've recently updated our Privacy Statement, available here ×

Sample chart themes


pmccall

Recommended Posts

We're trying to create a chart theme similar to the Eye Candy Sixties theme supplied with 3.5.2

There are many, many files in the demo which reference this theme, and I can't get a handle on how these files interact, or even if some of them are only required only for the demo build.

Can anyone give me an overview on how the pieces fit together?  I'm attaching the directory structure of all the chart theme files I've identified.

Thanks -

Code:
chartthemes\build\classes	jasperreports_extension.properties	jasperreports.properties	AllCharts.properties	BarChartCustomizer.class	ChartThemesApp.class	chartthemes\build\classes\net\sf\jasperreports\chartthemes	ChartThemeMapBundle.class	chartthemes\build\classes\net\sf\jasperreports\chartthemes\spring	AegeanChartTheme.class	ChartThemesConstants$1.class	ChartThemesConstants$2.class	ChartThemesConstants$3.class	ChartThemesConstants.class	ChartThemesUtilities.class	EyeCandySixtiesChartTheme.class	GenericChartTheme.class	GradientBarRenderer3D.class	GradientXYBubbleRenderer.class	ScaledDialPointer.class	ScaledDialRange.class	ScaledDialScale.class	ScaledDialValueIndicator.class	SquareXYAreaRenderer.class		chartthemes\build\classes\net\sf\jasperreports\chartthemes\spring\beans	aegeanChartPropertiesBean.xml	chartConstantsBean.xml	chartThemesBeans.xml	defaultChartPropertiesBean.xml	defaultChartTypePropertiesBean.xml	chartthemes\lib	castor-1.2.jar	chartthemes\src	AllCharts.properties	BarChartCustomizer.java	ChartThemesApp.java	jasperreports.properties	jasperreports_extension.propertieschartthemes\src\net\sf\jasperreports\chartthemes	ChartThemeMapBundle.java    	chartthemes\src\net\sf\jasperreports\chartthemes\spring		AegeanChartTheme.java	ChartThemesConstants.java	ChartThemesUtilities.java	EyeCandySixtiesChartTheme.java	GenericChartTheme.java	ScaledDialPointer.java	ScaledDialRange.java	ScaledDialScale.java	ScaledDialValueIndicator.javachartthemes\src\net\sf\jasperreports\chartthemes\spring\beans	aegeanChartPropertiesBean.xml	chartConstantsBean.xml	chartThemesBeans.xml	defaultChartPropertiesBean.xml	defaultChartTypePropertiesBean.xml	eyeCandySixtiesChartPropertiesBean.xml	chartthemes\target	jasperreports-chart-themes-3.5.1.jar	chartthemes\target\classes	jasperreports-extension.properties	chartthemes\target\classes\net\sf\jasperreports\chartthemes\springAegeanChartTheme.class	ChartThemesConstants$1.class	ChartThemesConstants$2.class	ChartThemesConstants$3.class	ChartThemesConstants.class	ChartThemesUtilities.class	EyeCandySixtiesChartTheme.class	GenericChartTheme.class	GradientBarRenderer3D.class	GradientXYBubbleRenderer.class	ScaledDialPointer.class	ScaledDialRange.class	ScaledDialScale.class	ScaledDialValueIndicator.class	SquareXYAreaRenderer.classchartthemes\target\classes\net\sf\jasperreports\chartthemes\spring\beans	aegeanChartPropertiesBean.xml	chartConstantsBean.xml	chartThemesBeans.xml	defaultChartPropertiesBean.xml	defaultChartTypePropertiesBean.xml	eyeCandySixtiesChartPropertiesBean.xml	chartthemes\target\maven-archiver	pom.properties
Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

When I am working with Chart Themes I export them to a jar (version 3.7 of iReport has a feature for this). Then I add the jar to the iReport classpath for designing and testing. When it is time to deploy I make sure the jar goes into the application classpath with all the other jars.

I hope this helps.

Link to comment
Share on other sites

I was just looking at the JasperReports reference. There is a setting for the chart theme. This could be part of the missing puzzle you are looking for. This could be set in the jasperreports.properties file (in the classes folder of a web application) or within the report definition itself as a property.

http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.chart.theme

Link to comment
Share on other sites

I found that setting, but it doesn't help me understand the usage of the specific Eye Candy Sixties files -

eyeCandySixtiesChartPropertiesBean.xml
EyeCandySixtiesChartTheme.java / .class
EyeCandySixtiesSettingsFactory.java / .class

Or the files which have mention of Eye Candy Sixties within them -

There *IS* an eye.candy.sixties.jrctx file, but it doesn't seem to have any relevance to the theme itself

Link to comment
Share on other sites

OK. I have done some more research. It seems chart themes is more of an extension of JasperReports, rather than part of the core.

If you look in JasperServer there is a jar file called jasperreports-chart-themes-x.jar. Within that jar are the classes and xml files you are mentioning. iReport contains something similar in its classpath. These classes/xml files are required for JasperReports to be able to make use of the JRCTX file. The pom file included in the samples generates these jars so you can add them to you own app if you plan to use themes.

Once these files have been deployed to the classpath you can add a JRCTX to the classpath. You will also need to set the appropriate properties files referencing your theme. I notice the new version of iReport 3.7 creates this file for you when you export your them to a jar.

I hope this helps.

 



Post Edited by lshannon at 01/14/2010 18:03
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...