On line guide/help
You are on page 35 of the online help. Navigate sequentially through the guide pages or search for a topic of interest to you.
Index Prev. NextLine chart
Draw a line or area chart
Draws a line chart or an area chart. More than a single measurement can be displayed.
Parameters
Elements / attributes of the <linechart> element:
Coordinate parameters (required) that define the print area of the 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 above parameters can alternatively be indicated in this way (one of the two methods is mandatory):
<x> Starting X coordinate (upper/left corner)
<y> Starting Y coordinate (upper/left corner)
<width> Width of the chart from the starting X coordinate
<height> Height of the graph starting from the starting Y coordinate
Parameters that define the appearance of the graph:
<style> (string) Chart style. Possible values:
line : Draw a line chart (default)
area : Draw an area chart
<opacity> Opacity of the areas, from 0 (transparent) to 1 (opaque, default). Useful with more measures.
<title> Chart title
<legend> Optional chart legend (if defined)
<minValue> (numeric, float) Chart min value (default 0): the value axis starts from this value
<maxValue> (numeric, float) Chart max value (full scale). Set 0 (default) for autoscale: the max value of all the measures, rounded up so that the step between the ticks is a round number, eg. 0, 500, 1000, 1500, 2000 (version 1.0.12 or later)
<tickscount> Number of ticks of the value axis (default 5)
<axislinestyle> Line style of the axes (if not set, the default line style is used)
<axisformat> Format mask of the value axis labels, eg. I, F1 or C0 $ (see the Value formatting page). If not set, the labels use the separators of the number format variables (NUMERICDECIMALSEPARATOR, NUMERICTHOUSANDSEPARATOR) and only the decimals needed (version 1.0.12 or later)
<showaxis> yes (default) or no: hides the axes with their ticks and labels (version 1.0.12 or later)
<titlefont> Sets the title font text style (if not set, the default font style will be used)
<axisfont> Sets the axis labels font style (if not set, the default font style will be used)
<measures> Defines a list of measures (see the Measures page) with the properties of each measure. There must be at least one measure: each measure is a line (or an area) of the chart.
<datalist> Defines the list of data to use in the chart. Each data element contains one value for each measure, separated by spaces. An empty value (eg. an empty field) is a missing value: no point is drawn and the area is interrupted; 0 is a valid value (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 line chart with two measures. To draw the same data as an area chart, set style="area" (and optionally opacity="0.6" to see the overlapping areas).
Line chart example