Customizing the label in table cells

Properties for customizing labels

You can use the CSS properties listed in the following table to customize the label used to represent an attribute in a table component.
CSS Property
Type of Value
Default
Usage
label
String
null
Text to be displayed for the label. By default, no text is displayed.
labelVisible
Boolean
true
Determines whether the label is displayed or not.
labelFont
Font
null
Font to be used for the label. By default, it is a sans serif font.
labelForeground
Color
null
Color to be used for the label foreground of a cell. By default, the color is black.
labelBackground
Color
null
Color to be used for the label background of a cell. By default, the color is white.

How to customize an attribute in a table component

This example shows how to customize the representation of the attribute throughput in a table component.
<class>
  <name>Element</name>
  <superClass>ilog.tgo.model.IltNetworkElement</superClass>
  <attribute>
    <name>throughput</name>
    <javaClass>java.lang.Integer</javaClass>
  </attribute>
</class>

How to customize cell labels

The following example shows how to customize the cell labels in the class Element .
object."Element/throughput" {
       label: @throughput;
       labelForeground: yellow;
       labelBackground: red;
}
In this example, the value of throughput is automatically converted from Integer to String through the application type converter when the value of label is computed. Alternatively, you could use a format function ( @|format ) to obtain the same result. See Expressions for more information.