On line guide/help

You are on page 25 of the online help. Navigate sequentially through the guide pages or search for a topic of interest to you.

Index Prev. Next

Piechart

Draw a pie / ring chart

A pie chart, or pie graph, is a circular statistical graphic that's divided into slices to illustrate numerical proportion. In a pie chart, the arc length of each slice (and consequently its central angle and area) is proportional to the quantity it represents. A ring chart, also known as a donut chart, is essentially a pie chart with a hole in the center. This hole makes the chart look like a donut, hence the name.


Parameters

Elements / attributes of the <piechart> element:

Coordinate parameters (required) that define the print area of the pie chart
<x1> Starting X coordinate (upper/left corner)
<y1> Starting Y coordinate (upper/left corner)
<x2> Ending X coordinate (bottom/right corner)
<y2> Ending Y coordinate (bottom/right corner)
The coordinates can also be set with <x>, <y>, <width>, <height> instead of x1, y1, x2, y2 (one of the two methods is required).

Parameters that define the appearance of the graph:
<border> Border of the slices: 0 hide (default), 1 show
<radius> Graph radius (0 : auto, the radius will be calculated so that the graphic fills the print area while maintaining the proportions of a circle)
<style> Chart style. Possible values:
CLASSIC or DEFAULT : Pie chart style
RING or DONUTS : Ring chart style (default)
<legend> Optional chart legend (if defined)
<datalist> Data to represent (required): one value for each slice (see the Datalist page)
<showtotal> Show the total value in the center of the chart: yes (default) or no (version 1.0.11 or later)
<totallabel> Text printed above the total value (default: TOTAL; empty string = value only) (version 1.0.11 or later). The label and the value are printed on two lines inside the ring hole; the font is reduced if the text does not fit (version 1.0.12 or later)
<totalfont> Font of the total (if not set, the current font is used) (version 1.0.12 or later)
<format> Format mask of the total value, eg. F2 or C2 € (version 1.0.11 or later). It is also the format of the legend values, if the legend has no format (version 1.0.12 or later)

Optional parameters:
<printif> Optional expression: the element is printed only if the expression is true, eg. {doc.type}=1. See the Conditional printing page.

Example

A ring chart with a vertical legend, and the total printed in the center of the chart.

Pie / ring chart example