Jaspersoft Tech Talk Episode #15: Chart Customizers

Post on 25-May-2015

571 views 2 download

description

Need to customize a JFreeCharts beyond what is exposed in iReport? This tech talk is about customizing JFreeCharts by implementing a Chart Customizer in Java. Intended audience is Java developers looking to quickly get started customizing charts. For more information, join the Jaspersoft Customer and Developer community: http://community.jaspersoft.com See the video of the presentations here: http://www.youtube.com/watch?v=kjGQ5hlg__k

Transcript of Jaspersoft Tech Talk Episode #15: Chart Customizers

Presenter:

John Johnson –

Professional Services Consultant

Tech Talk No. 15:Chart Customizers

3 Charting Libraries in Jaspersoft

JFreeCharts Fusion Charts (Charts Pro) HighCharts (HTML5)

©2012 Jaspersoft Corporation. Proprietary and Confidential 2

Chart Themes

Give a set of charts/graphs a common look and feel Defined in an external file (*.jrctx which becomes .jar file) iReport offers its own designer for creating a theme

Template Inspector Designer Properties Chart Selector

©2013 Jaspersoft Corporation. Proprietary and Confidential

Chart Customizers

When chart themes and properties aren’t enough we can customize the JFreeCharts class libraries through Java code

Examples: Colouring specific bars Hiding bars Width of bars Complex changes to chart display Complex logic Add trend lines

©2012 Jaspersoft Corporation. Proprietary and Confidential 4

Write a Customizer class

Write class that implements Interface JRChartCustomizer

Package new class in jar file Set Customizer Class Property Put jar on iReports classpath or in resource section on

server

Resources

iReport Ultimate Guide http://jasperreports.sourceforge.net/api http://www.jfree.org/jfreechart/api/javadoc/