11. The chart example explained
The reportChart.xre entry in the database contains an example
that shows how to use J4L RChart within the designer. The usage of
RChart involves 2 steps:
- First you have to design the chart independently of the FO Designer.
The documentation for RChart is here
Optionally you can use the Visual Builder to design
In any case the output of the chart designer process is a parameters
file (see example\chart\stackedBar.txt) which contains the
chart and some test data you have used during the development.
We do not recommend to develop a new chart from scratch but take one
of the existing example and modify it according to your needs. You can
download the Rchart evaluation package and you will
find many examples in the data\examples directory.
- in the second step you create your report, add a chart object and
specify the following properties (see screenshot below):
- the "Data File" field must point to the chart's parameter
- the parameters of the data file whose values must be overwritten
by the values from the XML file. You can enter up to 9 of these
In the example the values for the parameters SERIE_DATA_1,
SERIE_DATA_2 and XAXIS_LABELS will be read from the XML elements
defined in the "XPath" fields (thus the test values for these
parameters in the stackedBar.txt file, will be overridden).