iReport Ultimate Guide - Nimsoft Library
iReport Ultimate Guide - Nimsoft Library iReport Ultimate Guide - Nimsoft Library
iReport Ultimate GuideFigure 12-9Chart element property sheetCurrently, UR takes advantage of only a small portion of the capabilities of the JFreeChart library. To customizea graph, a class must be written that implements the following interface:net.sf.jasperreports.engine.JRChartCustomizerThe only method available from this interface is the following:public void customize(JFreeChart chart, JRChart jasperChart);It takes a JFreeChart object and a JRChart object as its arguments. The first object is used to actually produce the image,while the second contains all the features you specify during the design phase that are relevant to the customize method.12.5 Using Chart ThemesAnother way to customize graphs is by creating a chart theme, which gives you full control over the style of the chart. Chartthemes allow you to customize the design of a chart. There are several techniques for creating a chart theme, but the simplestone for the end user is to create a JRCTX file (JasperReports Chart Theme XML) using iReport. In this section we will seehow to create such a file and how to use it in a report.To create a JasperReports Chart Theme XML file, select New → Chart Theme from the File menu and specify where to storethe new file (which has the file extension .jrctx).12.5.1 Using the Chart Theme DesignerWhen you create a new chart theme, iReport automatically opens the theme in the Chart Theme Designer. This designer hasthree main views:• Template Inspector. Tree view showing the several sections of the chart that you can customize.• Main view. Displays a real time preview of the theme.• Property sheet. Lists the properties that you can modify.230
ChartsFigure 12-10 Chart Theme DesignerUR organizes a chart theme into seven sub-sections:• Chart• Title• Subtitle• Legend• Plot• Domain Axis• Range AxisiReport allows you to design the properties for each part of the chart theme. Figure 12-11 shows which part of the chart thesesections affect.231
- Page 179 and 180: Data Sources and Query ExecutersFig
- Page 181 and 182: Data Sources and Query ExecutersFig
- Page 183 and 184: Data Sources and Query ExecutersFig
- Page 185 and 186: Data Sources and Query ExecutersFig
- Page 187 and 188: Data Sources and Query Executers•
- Page 189 and 190: Data Sources and Query ExecutersAft
- Page 191 and 192: Data Sources and Query ExecutersIns
- Page 193 and 194: Data Sources and Query Executerspub
- Page 195 and 196: Data Sources and Query ExecutersFig
- Page 197 and 198: Data Sources and Query ExecutersFig
- Page 199 and 200: Data Sources and Query Executersbe
- Page 201 and 202: Data Sources and Query ExecutersFig
- Page 203 and 204: Data Sources and Query ExecutersWhe
- Page 205 and 206: Data Sources and Query ExecutersCod
- Page 207 and 208: Data Sources and Query ExecutersPre
- Page 209 and 210: Data Sources and Query ExecutersFig
- Page 211 and 212: Data Sources and Query Executersspe
- Page 213 and 214: Data Sources and Query Executers•
- Page 215 and 216: Data Sources and Query Executersof
- Page 217 and 218: Data Sources and Query ExecutersThi
- Page 219 and 220: Data Sources and Query ExecutersCod
- Page 221 and 222: Data Sources and Query ExecutersIf
- Page 223 and 224: ChartsCHAPTER 12 CHARTSUR provides
- Page 225 and 226: ChartsFigure 12-3Chart selection wi
- Page 227 and 228: ChartsFigure 12-6Dataset configurat
- Page 229: settings). These four fields have t
- Page 233 and 234: ChartsFigure 12-12 Example chart th
- Page 235 and 236: Run your report. iReport should dis
- Page 237 and 238: Charts1. First create a report.Figu
- Page 239 and 240: Charts4. Right-click on the chart a
- Page 241 and 242: Flash ChartsCHAPTER 13 FLASH CHARTS
- Page 243 and 244: Flash ChartsThe layout properties f
- Page 245 and 246: Flash ChartsThe following figure sh
- Page 247 and 248: Flash ChartsTable 13-2Entity IDs of
- Page 249 and 250: Flash ChartsTable 13-3Entity expres
- Page 251 and 252: Flash ChartsFigure 13-10 Specifying
- Page 253 and 254: Flash ChartsFigure 13-12 Bar chart
- Page 255 and 256: Flash ChartsFigure 13-16 The Charts
- Page 257 and 258: Flash ChartsFigure 13-19 Advanced o
- Page 259 and 260: Flash ChartsFigure 13-22 Entering t
- Page 261 and 262: Flash ChartsFigure 13-24 Specifying
- Page 263 and 264: Flash ChartsSpark LineSpark ColumnS
- Page 265 and 266: Flash ChartsFigure 13-32 Common opt
- Page 267 and 268: Flash ChartsFigure 13-35 Output of
- Page 269 and 270: Flash ChartsFigure 13-39 Output of
- Page 271 and 272: Flash ChartsFigure 13-43 Example of
- Page 273 and 274: Flash ChartsFigure 13-46 Specifying
- Page 275 and 276: Flash ChartsFigure 13-49 Specifying
- Page 277 and 278: Lists, Tables, and BarcodesCHAPTER
- Page 279 and 280: Lists, Tables, and BarcodesFor your
<strong>iReport</strong> <strong>Ultimate</strong> <strong>Guide</strong>Figure 12-9Chart element property sheetCurrently, UR takes advantage of only a small portion of the capabilities of the JFreeChart library. To customizea graph, a class must be written that implements the following interface:net.sf.jasperreports.engine.JRChartCustomizerThe only method available from this interface is the following:public void customize(JFreeChart chart, JRChart jasperChart);It takes a JFreeChart object and a JRChart object as its arguments. The first object is used to actually produce the image,while the second contains all the features you specify during the design phase that are relevant to the customize method.12.5 Using Chart ThemesAnother way to customize graphs is by creating a chart theme, which gives you full control over the style of the chart. Chartthemes allow you to customize the design of a chart. There are several techniques for creating a chart theme, but the simplestone for the end user is to create a JRCTX file (JasperReports Chart Theme XML) using <strong>iReport</strong>. In this section we will seehow to create such a file and how to use it in a report.To create a JasperReports Chart Theme XML file, select New → Chart Theme from the File menu and specify where to storethe new file (which has the file extension .jrctx).12.5.1 Using the Chart Theme DesignerWhen you create a new chart theme, <strong>iReport</strong> automatically opens the theme in the Chart Theme Designer. This designer hasthree main views:• Template Inspector. Tree view showing the several sections of the chart that you can customize.• Main view. Displays a real time preview of the theme.• Property sheet. Lists the properties that you can modify.230