Chapter 13 - Grid Layout for richer content with a Pie Chart

Building BIRT reports process is very close to build HTML pages. In this chapter we will add a grid layout and a pie chart to visualize issue types.

Drag & drop a Grid item from the Palette view into the report Layout to add one column and two rows:

Then drag&drop the the Table into the Grid's bottom cell in the Outline view: (alternatively you can also cut the table and paste it into the Grid's cell on the Layout directly):



Add a Chart item onto the Grid's top Cell and select a Pie chart type with 2D with Depth dimension:

Click on the Next button, click on the Use data from option and select the Reported Issues Data Source on the dropdown:


Select the row["Type"] as category definition, click on the Grouping & Sorrting button and select Count as Grouping Function

Select the row["Type"] as input data for the graph:


Click on the Next button and set the chart Title:

Then remove the series name:

Select the Value Series, scroll down the panel to the bottom and check the Show Series Labels option to display the amount of issue types on the chart:

The chart is almost finished. However, pay attention to the chart font type. It is the BIRT's defautlt font type. We have to set our custom the style for the chart. Stykes are inherited in BIRT, therefore we eill set the custom style in the root parent item (the Grid) instead of each chikdren individually. In this way, any change in the style will be automatically aplied to the grid layout children. 

Select the Grid item in the Outline view and set the Style general property to JIRA.



Did you remenber we set the Style to JIRA too for the Table? We have to remove it, in this way the Table inehits the style from its Grid parent item, Select the Table item in the Outline view and set the Style to None again. It looks like having no effect as the custom style of the Table is replaced by its Grid parent style.


Run the report: