Standard Data Class

The Standard data class is the most intuitive data class. Graphs in the Standard data class organize data by series and categories, which correspond to rows and columns, respectively (although you can switch the series and categories by transposing the graph). Each data item consists of only one data value, which indicates the size or height of the data item. Each data item belongs to exactly one category and one series.

Data items are grouped together according to their category. Unless you override a data item's color, each data item in a series is shown in the same color and symbol. In line graphs, data items in a data series are connected by a line. There is one legend item for each series.

The Standard data class supports the following graph types:

Because these graphs are all in the same data class, a data set that can be used for one of these graph types can be used for any of these graph types.

Note: Pie graphs accept only one category of data, while Pareto graphs accept only one series of data.

Standard data sets can be organized in the following formats:

Spreadsheet

When organizing a Standard data set in a spreadsheet format, first row data are interpreted as category names, and first column data are interpreted as series names. Leave the top left cell of the spreadsheet blank. The remaining data items are treated as individual data items, with each row corresponding to a single series and each column corresponding to a single category. This data format is used with Corda Builder's Data Editor.

The example below displays a typical data set for a graph in the Standard data class.

Alternative Data Organization Format

Some databases or SQL queries may produce data files or result sets in a format somewhat different than this spreadsheet format. One common variation is to have each data item listed as a separate row on the table. In this case, each row contains a series name, category name, and value, with series and category names repeated throughout the table.

For example, the Standard Spreadsheet Format table below provides a data set in the standard spreadsheet format. This same data set can also be organized as shown in the Alternative Data Format table.

Standard Spreadsheet Format

 

Arrivals

Departures

Unused

Out of Commission

Atlanta

23

36

11

7

Boston

41

17

25

9

 

Alternative Data Format

Series

Categories

Values

Atlanta

Arrivals

23

Atlanta

Departures

36

Atlanta

Unused

11

Atlanta

Out of Commission

7

Boston

Arrivals

41

Boston

Departures

17

Boston

Unused

25

Boston

Out of Commission

9

 

Corda Server™ supports data files and SQL queries in both of these formats. During data import, it automatically detects the format and processes the data set accordingly.

Note that each row in the Alternative Data Format table maps to a single cell in the Standard Spreadsheet Format table. The rows are in the same order as the cells (left-to-right, top-to-bottom). Also, the first row (the one with the Series, Categories, and Values labels) is optional. Corda® 7 ignores it if it is there, but also doesn't mind if it is absent.

Note: This alternative data format is less succinct than the standard spreadsheet format, since it lists the same category and series names multiple times. If you are concerned about performance or bandwidth, especially for large data sets, you should avoid organizing data in this format.

ITXML

For the Standard data class, ITXML Data properties require the Value attribute, which specifies the value of the data item.

The code sample below illustrates how the data set for a graph in the Standard data class looks in ITXML. Note that the data set is the same one used in the graph example above.

Standard Data Set in ITXML

<cit:data>

<cit:column name=”Highland Mall”/>

<cit:column name=”Lakeline Mall”/>

<cit:column name=”Barton CreekSquare”/>

<cit:row name=”1999”>

<cit:data-item value=”27,543,000”/>

<cit:data-item value=”34,654,000”/>

<cit:data-item value=”17,654,000”/>

</cit:row>

<cit:row name=”1999”>

<cit:data-item value=”23,987,000”/>

<cit:data-item value=”37,917,000”/>

<cit:data-item value=”29,372,000”/>

</cit:row>

<cit:row name=”1999”>

<cit:data-item value=”21,581,000”/>

<cit:data-item value=”34,217,000”/>

<cit:data-item value=”32,138,000”/>

</cit:row>

</cit:data>

For more information about ITXML, see ITXML in the Corda 7 Developer Reference.

PCScript

Sending a standard data set via PCScript involves the following steps:

  1. Specify the category names by calling the graph.setCategories() method. Separate each category name by a semi-colon.

  2. Specify each series to the graph via separate graph.setSeries() commands. The first parameter in this command is the series name, followed by each data item in the series. Separate series data items with semi-colons.

The PCScript sample below generates the graph example above. This PCScript assumes that the graph object is named graph.

Standard Data Set in PCScript

graph.setCategories(Highland Mall; Lakeline Mall; Barton Creek Square)

graph.setSeries(1999; 27543000; 34654000; 17654000)

graph.setSeries(2000; 23987000; 37914000; 29372000)

graph.setSeries(2001; 21581000; 34217000; 32138000)

Warning: When using PCScript, do not use comma separators in numbers, or Corda Server interprets them as multiple data values.

For more information about PCScript, see PCScript in the Corda 7 Developer Reference.