Defining the visual attributes is straightforward. Simply use the attribute='value' format for each attribute; for example, color='8BBA00'. Defining the data, however, requires programming to iterate through a data set and retrieve values from each row of data.
The following examples include code snippets, which show how to accomplish this task using JavaScript. For complete programming examples using JavaScript and Java, review the tutorials later in this chapter.
In the doughnut chart example shown in Figure 18-8, data is defined using the <set> tag and the following format:
The code you write must get values from two columns, one that stores business division values, and another that stores revenue values. Assume that the data set providing the data values returns rows as shown in
Figure 18-10.
In the multi-series chart example shown in Figure 18-9, category data is defined within the <categories> tag using the <category> tag in the following format: