Chart Data Formats

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:

Figure 1. Sample Horizontal Bar Chart XML
<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.

Note:
  • There are no restrictions on the number or names of the attributes of BLOCK element. This facilitates passing an arbitrary set of attributes in the links from a chart (provided the configuration is updated appropriately). However, one should keep in mind, that the names of the attributes provided in this section are reserved and bound to the particular elements, i.e. even though START_DATE attribute could be added to a BLOCK element, in this case it will be interpreted as a literal value and not a date as it would be in the context of CAPTION element.
  • Due to the nature of pie chart, no more than one BLOCK element will be processed and displayed in this type of chart.