The pie chart displays a sliced, multi-colored pie with individual slices consisting
of individual series information. The pie chart uses its own dataset type, versus using
a category or XY series dataset. The pie chart utilizes the common properties defined
above, but does not utilize the category or XY dataset properties. Instead, it defines
its own properties for providing chart data using the PieDataSetCollector. The pie
chart defines the following rendering properties:
Note that the pie chart does not share the common properties horizontal, series-color,
stacked, or series-names. The pie chart defines the following dataset properties:
Pie chart example
For the pie chart example, you’ll compare the various costs of inventory items to
one another by category. First, you’ll need to define an SQL query as shown next:
SELECT "INVENTORY"."ITEMCATEGORY", "INVENTORY"."ITEMNAME", "INVENTORY"."COST" FROM "INVENTORY" ORDER BY "INVENTORY"."ITEMCATEGORY" ASC, "INVENTORY"."ITEMNAME" ASC
You’ll then need to define a Group Header for your report. Right-click on the
Groups section within the report structure and edit the root group, naming the
group Item Category. Select the ITEMCATEGORY field as the only field in the
Selected Items list. Expand the Group node in the structure tree, and select the
Group Header. Now, uncheck the hide-on-canvas property, so you can view the
Group Header in the canvas.
Drag-and-drop the ITEMCATEGORY field at the top of the Group Header. Place a
chart below the text field, and click Edit Chart…
Select the Pie chart type . You’ll start configuring the chart by selecting the correct
dataset. For the value-column, select the COST field. For the series-by-field property,
select the ITEMNAME field.
You’ll also need to tell the chart collector to reset the data after each group. Set the
reset-group property to the already defined Item Category group.
Finally, you’ll want to customize some of the rendering properties. Set the
explode-slice to maxValue, and set the explode-pct to 0.5. This will highlight
the most expensive item in each category. Also set show-legend to False to hide
the legend and show-labels to True to display the individual pie slice labels.
Click the OK button and preview the report. You should see a group of charts
as shown in the following figure:
The ring chart is identical to the pie chart, except that it renders as a ring versus
a complete pie. In addition to sharing all the properties similar to the pie chart,
it also defines the following rendering property :
Ring chart example
For this example, simply open the defined pie chart example and select the Ring
chart type. Also, set the section-depth to 0.1, in order to generate the following effect:
Multi pie chart
The multi pie chart renders a group of pie charts, based on a category dataset. This
meta-chart renders individual series data as a pie chart, each broken into individual
categories within the individual pie charts. The multi pie chart utilizes the common
properties defined above, including the category dataset properties. In addition to
the standard set of properties, it also defines the following two properties:
Note that the horizontal, series-color, stacked and stacked-percent properties do not
apply to this chart type.
Multi pie chart example
This example demonstrates the distribution of purchased item types, based on
payment type. To begin, create a new report. You’ll reuse the bar chart’s SQL query.
Now, place a new Chart element into the Report Header. Edit the chart, selecting
Multi Pie as the chart type.
To configure the dataset for this chart, select ITEMCATEGORY as the category-column.
Set the value-columns property to QUANTITY and the series-by-field to PAYMENTTYPE.