Adding charts to a report

JasperReports supports several kinds of charts, such as pie charts, bar charts, XY bar charts, stacked bar charts, line charts, XY line charts, area charts, XY area charts, scatter plot charts, bubble charts, time series charts, high low charts, and candlestick charts. We will discuss each one of these in detail, but before we do so, let's discuss common properties among all charts.

There is a JRXML element used to create each type of chart; all of these elements will be discussed in subsequent sections. Each of these elements must contain a <chart> element as one of its subelements. The <chart> element must contain a <reportElement> element to define the chart's dimensions and position as one of its subelements. It may ...

Get JasperReports 3.5 for Java Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.