For the Plot data class, PopChart XML Data elements require either the X and Y attributes (for X-Y graphs) or the Date and Value attributes (for Time graphs).
Example 12.7 illustrates how a data set for a Time graph would look in PopChart XML. Note that the data set is the same one used in Example 12.5.
Example 12.7 Time Plot Data Set in PopChart XML
<GraphData Name='graph2' SortData='Yes'>
<Series Name='Name Recognition'>
<Data Date='6/21/2001' Value='54'/>
<Data Date='8/12/2001' Value='90'/>
<Data Date='10/16/2001' Value='75'/>
<Series Name='Considering Buying'>
<Data Date='7/1/2001' Value='37'/>
<Data Date='12/12/2001' Value='23'/>
Note: The SortData attribute in a graph makes it so the data points are connected in order of their date (or x value) instead of the order in which they are listed.
Example 12.8 illustrates how a data set for a X-Y graph would look in PopChart XML. Note that the data set is the same one used in Example 12.6, minus the bubble values.
Any graph using a Plot data set can become a bubble graph by adding the Bubble attribute. Example 12.9 illustrates how a data set for a Bubble graph would look in PopChart XML. Note that the data set is the same one used in Example 12.6.
Example 12.9 Bubble Plot Data Set in PopChart XML
<Data X='12' Y='54' Bubble='5'/>
<Data X='45' Y='90' Bubble='10'/>
<Data X='30' Y='42' Bubble='3'/>
<Data X='5' Y='6' Bubble='4'/>
<Data X='25' Y='60' Bubble='6'/>
For an explanation of the PopChart XML data format, refer to "Sending Data with PopChart XML" in Chapter 6 of the PopChart Server User Guide.