2018.1

Table Of Contents
l A Div element. It has a data-amchart attribute, as you can see when you select the
chart and open the Source view in the Workspace. The data-amchart attribute
contains settings for how the data is displayed. These settings are made via the chart's
properties (see "Enhancing a charts' design" on page579).
l A script. The script determines which data are displayed in the chart, with which colors
and labels. The script can be edited any time; see "Selecting data in a Business Graphic
script" below.
When a preview or output must be generated, the script adds the data for the chart to the
data-amchart attribute (in a dataProvider property). Connect then passes the
value of that attribute to the integrated amCharts library.
Selecting data in a Business Graphic script
A Business Graphic script determines which data, colors and labels are used in the chart.
Double-click the script on the Scripts pane to open it.
Tip
To find the script that provides data for a chart, hover over the names of the script in the Scripts
pane. That particular script will highlight the chart in the template and its selector is the same as the
ID of the business graphic (preceded by #).
1.
Use the Input Type drop-down to select the source of the data for the Chart:
l
Data Fields: The data originate from data fields in the main record. The chart will
have the same number of items for each record.
l
Data Table, the data are taken from a detail table that you select using the Detail
Table drop-down.
Note
In Pie Charts, only data from the first record in the detail table are used.
How to create a Pie Chart that has one slice per detail record is explained in a
How-to: Put one slice per detail record in a Pie Chart.
Page 577