Dashboard Home

Visual Alerts and Exception Highlights

Visual Alerts and Exception Highlights

The above example shows how to highlight certain exception in the data.

 

In this case, the 9th column (index=8) is visually differentiated when the value is ZERO

 

Similarly the 3rd column (index=2) is changed to blue background when the value is between a certain range.

 

You can similarly modify the script to add more custom formats.

 

colIndex is a pre-defined variable for reference purpose. You cannot modify or assign new values to these variables.

Similarly the variable "isNumeric" is a flag indicating if the column contains character or numeric values.

 

There are other seeded variables for easy reference

 

table = this is the direct reference to the JTable. You get full access to the table api through this variable. Do not use this if you don't know how to use it

 

value = this is the cell value reference. If the column contains string value then you can refer it to by value.toString() function

 

rowIndex = This is the row index of the current cell

 

colIndex   = This is the column index of the current cell

 

renderer = This is the object that manipulates the appearance of the cell. When the table is refreshed, the renderer paints each visible cell.

 

isNumeric = flag indicating if the cell value is numeric or not

 

numericValue = if the cell has numeric value, then this variable will contain the actual numeric value. Use this for further manipulation and conditional formatting.