Java Reference
In-Depth Information
Group : The chart expression is evaluated when the group specified by
evaluationGroup changes.
Now : The chart expression is evaluated when its containing band is filled. This
is the default value for this attribute.
Page : The chart expression is evaluated when rendering all other elements in
the same page is finished.
Report : The chart expression is evaluated when rendering all other elements
in the report is finished.
isShowLegend
This attribute is used to determine if a chart legend will be displayed on the report.
The valid values for this attribute are listed below:
true : A legend will be displayed on the report. This is the default value.
false : A legend will not be displayed on the report.
Chart Customization
JasperReports uses JFreeChart as the underlying charting library. JFreeChart
contains features not directly supported by JasperReports. By supplying a
customizer class via the customizerClass attribute, we can take advantage of
JFreeChart features.
All customizer classes must implement net.sf.jasperreports.engine.
JRChartCustomizer . This interface contains a single method. The method signature is:
customize(org.jfree.chart.JFreeChart chart , JRChart jasperChart)
org.jfree.chart.JFreeChart is JFreeChart is representation of a chart ; JRChart
is JasperReports representation of a jasperChart . Since the customize() method is
automatically called by JasperReports when filling a report, we don't need to worry
about instantiating and initializing instances of these classes.
Chart customization is more of a JFreeChart feature rather than a JasperReports
feature. Therefore, an example has not been shown.
More information about JFreeChart can be found at http://www.jfree.org/
jfreechart/ .
The JRXML <chart> element contains some attributes used to support bookmarks
and hyperlinks. These attributes are discussed in detail in Chapter 8.
 
Search WWH ::




Custom Search