On line guide/help

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

Index Prev. Next

Bar chart

Draw a bar chart

Draws a vertical or horizontal bar chart. If more than one measurement is displayed, they are printed side by side.


Parameters

Elements / attributes of the <barchart> 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:
<orientation> (string) Chart orientation. Values can be indicated in the various ways listed belows:
h , horiz , horizontal : horizontal (default)
v, vert, vertical : vertical
<title> Chart title
<legend> Optional chart legend (if defined)
<minValue> (numeric, float) Chart min value (default 0): the value axis and the bars start 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, 75, 150, 225, 300 (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)
<barmargin> Space between the bars (default 1, 0 = no space)
<barsize> Bar size. Width for vertical bar chart, height for horizontal bar chart. Set 0 for auto size.
<showvalues> Show or hide data values. Possibile values:
yes (or on, 1) Show the values over the bars
no (or off, 0) Hide the values (default)
<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 series of bars, printed side by side.
<datalist> Defines the list of data to use in the chart. Each data element contains one value for each measure, separated by spaces.

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

Related topics / download links / see also..
21 - Font
36 - Datalist

Example

A vertical bar chart with two measures: each data element contains two values (hardware and software sales), printed as side by side bars.

Bar chart example