I have a simple table with a custom renderer, a la:
table.getVisualization(function(tableView) {
tableView.table.addCellRenderer(new CustomRangeRenderer());
where my CustomRangeRenderer modifies the class of certain cells
var CustomRangeRenderer = TableView.BaseCellRenderer.extend(
{
render: function($td, cell)
{
var value = cell.value;
if (value=='0') {
{
$td.addClass("zero");
}
}
}
What I need to do, however, is modify the column **headers** programmatically. For example, I want the column header to be red if all the values in the table for that column are zero. I can't find a way to modify this given just the td/cell. I thought maybe it has to be done with something other than a cell renderer, but I can't find anything in the Splunk JS docs that is appropriate. By the way, using SideView is not an option.
Any suggestions?
↧