Time for action – creating a pie chart
We will add a pie chart to our report to display information about the movies rented. Then we will configure the type of chart we want to visualize, its data source, and other characteristics.
-
We will create a chart to display an analysis of the percentage of movies rented by rating. Add a chart to the Report Header section, dragging-and-dropping the ()
Chart ()
object. Double-click on Chart to start configuring it.
In the upper part, choose the pie chart type:
In the right-hand part, configure the data source as follows:
value-column =
count_rental
(the value under analysis)series-by-field =
[rating]
(the item to be represented as a portion of the pie)
In the left-hand part, configure the following:
chart-title =
Percentage of films rented by Rating
label-font =
FreeSans-BOLD-14
label-format =
{0}: {2}
3-D =
True
show-legend =
False
Next, click on OK to continue. If we preview it, we will see this:
What just happened?
We added a Chart
object to the...