The LocalGridData element is structured like a grid. Its definition is as follows.
<!ELEMENT LocalGridData (RowLabels?, ColLabels?, DataValues?)> <!ATTLIST LocalGridData rowCount CDATA #REQUIRED colCount CDATA #REQUIRED >
The LocalGridData element represents a grid of data. The rowCount and colCount attributes specify the number of rows and columns in the grid. You must specify these values. The RowLabels and ColLabels elements are defined as follows.
<!ELEMENT RowLabels (Label*) > <!ELEMENT ColLabels (Label*) >
The Label element is defined as follows.
<!ELEMENT Label (#PCDATA) >
The DataValues element represents the data body of the grid. It is defined as follows.
<!ELEMENT DataValues (RowData*) >
The RowData element represents a row of data in the grid. It is defined as follows.
<!ELEMENT RowData (Cell*) >
The Cell element represents one cell in a row of data. It is defined as follows.
<!ELEMENT Cell (#PCDATA) >
Note that, while you can store text values in a Cell element, the graph displays only numeric data.
The following figure shows a graph that has Quota and Sales data for January and February of 2002. This graph has a time axis, where the time values appear along the horizontal axis of the graph.
The following table shows the grid of data for this graph. The grid has one column for January and one for February. It has one row for Quota and one row for Sales. When the graph reads the LocalGridData from the XML, it will construct an identical grid as the local data source for the graph.
![]() |
2002-01-01 | 2002-02-01 |
Quota | 8000 | 6000 |
Sales | 7921 | 6732 |
The following example shows the LocalGridData element for this grid.
<LocalGridData rowCount="2" colCount="2" timeAxis="true" dateFormat="YYYY-MM-DD">
<ColLabels>
<Label>2002-01-01</Label>
<Label>2002-02-01</Label>
</ColLabels>
<RowLabels>
<Label>Quota</Label>
<Label>Sales</Label>
</RowLabels>
<DataValues>
<RowData>
<Cell>8000</Cell>
<Cell>6000</Cell>
</RowData>
<RowData>
<Cell>7921</Cell>
<Cell>6732</Cell>
</RowData>
</DataValues>
</LocalGridData>
Specifying
Graph Data Through the setTabularData Method
Handling Problems
in Graph Data
Data Requirements for
Different Kinds of Graphs