Are there any out of the box solutions to have conditional formatting of HTML tables?
With conditional formatting I am more interested in having different colors as cell
Maintain two variables for highest and lowest values in the table.
Add a function that gets called any time the table changes. Iterate through each cell and recalculate the highest and lowest values as necessary and then with an if statement (or something similar) reassign the correct color. For example, for each cell:
if(cellValue < minValue)
minValue = cellValue;
else if(cellValue > maxValue)
maxValue = cellValue;
var bracket = (cellValue - minValue) / (maxValue - minValue);
if(bracket < .2)
// make the cell green
else if(bracket < .4)
// make the cell green-yellow
else if(bracket < .6)
// make the cell yellow
...and so on. This is very brute force though. You can probably find a way to optimize the process of reassigning colors to existing cells.