DataHubTable Value Maps — change cell formatting or text based on a DataHub point value.
A value map is a mechanism for changing the formatting or displayed text in a cell based on the value of a DataHub point. The value map consists of a series of ranges associated with cell classes. If the value of the point falls within a range, then the cell is rendered using the class associated with that range. Ranges are specified as a minimum and a maximum value. If the point value is greater than the minimum, or less than or equal to the maximum (i.e., minimum < value <= maximum), then the value is within the range. If the minimum and the maximum for a range are the same value, then the point value must exactly match the minimum to be within the range. Ranges are compared to the value in the order in which they appear in the value map. Overlapping ranges are allowed. The first range to match the point value will be used.
A value map is a delimited string consisting of one or more groups of three arguments. The arguments in each group are minimum;maximum;classname respectively. The groups are delimited by semicolons (;), and there can be any number of such groups. If the value for any minimum is inf then the minimum is taken to be negative infinity. If the value for any maximum is inf then the maximum is taken to be positive infinity.
If no range matches the input value then the value is rendered in the default font, format and colors.
To assign a value map to an individual point, use a parameter named vmapN where N is the ordinal number associated with the cell specification.
To assign a value map to a class, use a parameter named cvmapN where N is the ordinal number associated with the cell class specification.
<PARAM NAME="vmap1" VALUE="inf;1;false_class;1;inf;true_class">
Will render a boolean value in either false_class or true_class depending on whether its value is 0 or 1.
<PARAM NAME="vmap2" VALUE="inf;-10;red_class;-10;-5;yellow_class;-5;5; green_class;5;10;yellow_class;10;inf;red_class">
Will render a numeric value as red_class if its absolute value is greater than 10, as yellow_class if its absolute value is between 5 and 10, and as green_class if its absolute value is less than 5.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.