DataHubTable Cell Specification

DataHubTable Cell Specification — specifies the position and contents of a table cell.

Description

A cell specification is a delimited string specifying the position and contents of a non-empty cell. Part of the specification is a content type. The arguments in the cell specification depend on the content type. The arguments must be specified in the order listed in the tables below. If you wish to specify an optional argument, you must also specify all arguments preceding it. If you wish to use the default value for an optional argument, specify null for that argument.

Label (Static Text) - Cell Type 0

A label specifies a text string that does not change.

ArgumentTypeDefaultDescription
rowcolorrequiredThe cell row, starting at 1.
columncolorrequiredThe cell column, starting at 1
typenumberrequired0 for a label cell.
labelstringrequiredThe text to display in the cell.
xalignmentstringleftleft, center or right horizontal alignment of the text in the cell.
yalignmentstringcentertop, center or bottom vertical alignment of the text in the cell.
fgcolorcolortable defaultThe color used to render the text. If not specified, uses the table's fgcolor parameter.
bgcolorcolortable defaultThe color used to render the cell background. If not specified, uses the table's bgcolor parameter.

Example

<PARAM NAME="cell1" VALUE="2;3;0;Test;left;center;#ffff00;#0000ff">

Will render the word Test in cell (2, 3) with left/center justification in yellow text on a blue background.

DataHub Point Value - Cell Type 1

This cell will display the value of a DataHub point. If the point value is a number you can specify the decimal format with which it is displayed.

ArgumentTypeDefaultDescription
rowcolorrequiredThe cell row, starting at 1.
columncolorrequiredThe cell column, starting at 1.
typenumberrequired1 for DataHub point value.
pointnamestringrequiredThe unqualified point name (no domain: part) to display.
xalignmentstringleftleft, center or right horizontal alignment of the text in the cell.
yalignmentstringcentertop, center or bottom vertical alignment of the text in the cell.
fgcolorcolortable defaultThe color used to render the text. If not specified, uses the table's fgcolor parameter.
bgcolorcolortable defaultThe color used to render the cell background. If not specified, uses the table's bgcolor parameter.
formatstringtable defaultThe decimal format to use when the value of the point is a number.

Example

<PARAM NAME="cell1" VALUE="2;3;1;Sine;left;center;#ffff00;#0000ff;0.0##">

Will render the value of the point Sine in cell (2, 3) with left/center justification in yellow text on a blue background, with 1 to 3 decimal places of accuracy

Indirectly Formatted Point - Cell Type 2

An indirectly formatted point reads its cell specification from a DataHub point. The value of the point must be a string containing a valid value specification for a cell.

ArgumentTypeDefaultDescription
rowcolorrequiredThe cell row, starting at 1.
columncolorrequiredThe cell column, starting at 1.
typenumberrequired2 for indirectly formatted point.
specpointstringrequiredThe name of a DataHub point from which to read the cell specification for this cell.
valuepointstringnullIf the cell specification in specpoint contains the word null for its point name, use valuepoint instead as the point from which to take the cell value.

Example

<PARAM NAME="cell1" VALUE="2;3;2;myspec;Sine">

will render the value of the point Sine in cell (2, 3) according to a cell's value specification contained in the DataHub point myspec. The point should contain just the content of a value parameter, like this:

2;3;1;Sine;left;center;#ffff00;#0000ff;0.0##

Member of Class - Cell Type 3

A class member takes its cell specification from a named cell class. All members of a cell class are formatted identically. Changes to the cell class will cause all cells in the class to be changed.

ArgumentTypeDefaultDescription
rowcolorrequiredThe cell row, starting at 1.
columncolorrequiredThe cell column, starting at 1.
typenumberrequired3 for member of a class.
labelstringrequiredIf the cell class is type 0 (a label) then this is a static text string. If the cell class is type 1 (a point) then this is the name of the DataHub point.
classnamestringrequiredThe name of the class to which this cell belongs.

Example

<PARAM NAME="cell1" VALUE="2;3;3;Sine;float_class">

Will render the value of the point Sine in cell (2, 3) according to the class specification of the class float_class.

Image - Cell Type 4

An image cell renders an image into the cell, clipping the image at the borders of the cell. The image is obtained from a URL.

ArgumentTypeDefaultDescription
rowcolorrequiredThe cell row, starting at 1.
columncolorrequiredThe cell column, starting at 1
typenumberrequired4 for image.
imageurlstringrequiredThe URL from which to obtain the image. This may be either an absolute URL of the form http://domain/path/image, or a relative URL of the form /path/image or path/image.
alphanumber1.0An alpha blend value from 0.0 to 1.0 where 0.0 is transparent and 1.0 is opaque.

Example

<PARAM NAME="cell1" VALUE="2;3;4;checkmark.gif;0.5">

Will render the image from the URL checkmark.gif into the cell. The image will be semi-transparent.