PopChart XML

For the Stock data class, PopChart XML Data elements require either the High and Low attributes. They can also include Open and Close attributes. These latter values will only be used for Candlestick and High-Low/Open-Close graphs.

Example 12.13 illustrates how a data set for a graph in the Stock data class would look in PopChart XML. Note that the data set is the same one used in Example 12.12.

Example 12.13 Stock Data Set in PopChart XML

<GraphData Name='graph'> 

   <Categories> 

      <Category Name='6/1'/> 

      <Category Name='6/2'/> 

      <Category Name='6/3'/> 

      <Category Name='6/4'/> 

   </Categories> 

   <Series Name='Cool Company Stock'> 

      <Data High='13' Low='11' Open='12' Close='11.3'/> 

      <Data High='12' Low='8' Open='11.3' Close='11'/> 

      <Data High='13' Low='9' Open='11' Close='11.9'/> 

      <Data High='14' Low='10' Open='11.9' Close='13.2'/> 

   </Series> 

</GraphData>

Note: With stock graphs, you can also set your categories directly in the <Data> tag. To do this, simply use the Name attribute and set it to your category name. This allows you to remove everything in the Categories element.

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.