Spectrum based hilites

Smartclient 9.0 does not allow users to specify a spectrum coloring scale as hilites for a ListGrid. It looks like you have a similar concept planned for Smartclient 10.0.

What would be nice would be to let users specify an array of colors, a min, and a max, and have columns in a ListGrid be colored accordingly.

I’ve implemented something that works for me, but this is something that I would guess that a lot of users would appreciate. What I did was add the RainbowVis-JS library and implement this:

      grid.getCellCSSText = function(record,row,col){                                                                   
         var field = this.getFieldName(col);                                                                            
         if(field in coloring){                                                                                         
            var value = record[field];                                                                                  
            if(value == null) return;                                                                                   
            var color = coloring[field].colourAt(value);                                                                
            var r = parseInt(color.substring(0,2),16).toString();                                                       
            var g = parseInt(color.substring(2,4),16).toString();                                                       
            var b = parseInt(color.substring(4,6),16).toString();                                                       
            return "background:rgba("+r+","+g+","+b+",0.5)";                                                            
         }                                                                                                              
      }

Instead, I’m envisioning something like this:

	hilites:     [
            {
                fieldName: "area",
                cssType: "background",
                spectrum: ["red","white","green"],
                min: -5.0,
                max: 5.0
            }

SmartClient 10.0 doesn’t actually plan this, you may be thinking of Color Scale charts.

That said, it makes sense as a feature, so it would be a valid Feature Sponsorship.

Note that this feature could be implemented with or without an interface for end users to specify this kind of hilite.