The data to be displayed in a chart comes from the server in XML format.
Below is example of the XML used to create a chart:
<CHART> <UNIT> <CAPTION TEXT="TR1" START_DATE="2004-12-31" END_DATE="2005-03-06"/> <BLOCK ID="1" TYPE="CR1" DUE_DATE="2005-01-01" LENGTH="33"/> <BLOCK ID="2" TYPE="CR3" DUE_DATE="2005-02-01" LENGTH="14"/> </UNIT> <UNIT> <CAPTION TEXT="TR2" START_DATE="2004-12-31" /> <BLOCK ID="3" TYPE="CR3" DUE_DATE="2005-01-02" LENGTH="11"/> </UNIT> <UNIT> <CAPTION TEXT="TR3" END_DATE="2005-03-08" /> <BLOCK ID="4" TYPE="CR1" DUE_DATE="2005-01-03" LENGTH="22"/> <BLOCK ID="5" TYPE="CR2" DUE_DATE="2005-01-09" LENGTH="15"/> <BLOCK ID="6" TYPE="CR3" DUE_DATE="2005-01-01" LENGTH="8"/> </UNIT> </CHART>
The root element, CHART, can contain any number of UNIT elements. These elements are used to group related information into groups (clusters) and contain one CAPTION element and one or more BLOCK child elements.
The CAPTION element displays an appropriate caption depending on what attributes are set:
Each BLOCK element represents a block to be drawn on a chart as a bar, column, line chart point or pie chart sector. This element must have an associated TYPE attribute to match it with a particular item. The LENGTH attribute is necessary to define the measurement of the block. In the bar or column chart this is the length/height of a bar/column; in a line chart it's the position of an edge point; in a pie chart it's the relative sector arc length. The ID attribute is a unique identifier for a block and can be used as a parameter for any hyperlinks. The optional DUE_DATE attribute can also be used as an ID parameter for hyperlinks on a particular block. It represents the due date for a given block.