<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Is it possible to change color of table cell depending on the dropdown input? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-change-color-of-table-cell-depending-on-the/m-p/306419#M19537</link>
    <description>&lt;P&gt;@ny34940, Please try the following run anywhere example based on Splunk's _internal errors. Please try out and confirm. &lt;/P&gt;

&lt;P&gt;It is setting the default Threshold values as 20%, both in Simple XML dropdown and JavaScript token. On change event of the Threshold Dropdown, the token value is capture and compared for each Percent cell value (&lt;CODE&gt;perc&lt;/CODE&gt;) using CustomRangeRenderer for the table with &lt;CODE&gt;id="table1"&lt;/CODE&gt;. CSS is applied through hidden &lt;CODE&gt;&amp;lt;html&amp;gt;&lt;/CODE&gt; pane (using &lt;CODE&gt;depends&lt;/CODE&gt; attribute with a token which is never set) with &lt;CODE&gt;&amp;lt;style&amp;gt;&lt;/CODE&gt; node within Simple XML.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4681i5D9B2C2AB5BEF700/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
Following is the SImple XML code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form script="table_color_by_dynamic_threshold.js"&amp;gt;
  &amp;lt;label&amp;gt;Change Table Cell Colors based on Drop Down&amp;lt;/label&amp;gt;
  &amp;lt;fieldset autoRun="true" submitButton="true"&amp;gt;
    &amp;lt;input type="time" token="tokTime" searchWhenChanged="false"&amp;gt;
      &amp;lt;label&amp;gt;Select Time&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;-30d@d&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="adjhours" searchWhenChanged="false"&amp;gt;
      &amp;lt;label&amp;gt;Threshold&amp;lt;/label&amp;gt;
      &amp;lt;choice value="20"&amp;gt;20%&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="40"&amp;gt;40%&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="60"&amp;gt;60%&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="80"&amp;gt;80%&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="90"&amp;gt;90%&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;20&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel depends="$alwaysHideCSSPanel$"&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;style&amp;gt;
           /* Tabel Cell Coloring */

           #table1 td.range-low {
               background-color: #65A637 !important;
           }

           #table1 td.range-severe {
               background-color: #D93F3C !important;
           }

           #table1 .table td {
               border-top: 1px solid #fff;
           }
           /* 
           Apply bold font for rows with custom range colors other than Green(default).
           Bold font will ensure that jQuery is working fine to apply appropriate range Class. 
           */
           #table1 td.range-low, td.range-severe{
               font-weight: bold;
           }
        &amp;lt;/style&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Splunk Errors % by Sourcetype&amp;lt;/title&amp;gt;
      &amp;lt;table id="table1"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| metadata type=sourcetypes where index="_internal"
| fields sourcetype totalCount
| eventstats sum(totalCount) as Total
| eval perc=round((totalCount/Total)*100,1)
| fields sourcetype perc
| sort - perc
| eval dummy="$adjhours$"
| fields - dummy&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$tokTime.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$tokTime.latest$&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is the JavaScript code for &lt;CODE&gt;table_color_by_dynamic_threshold.js&lt;/CODE&gt; to be placed under appserver/static folder on your app.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
     "underscore",
     "jquery",
     "splunkjs/mvc",
     "splunkjs/mvc/tableview",
     "splunkjs/mvc/simplexml/ready!"
 ], function(_, $, mvc, TableView) {

     // Access the "submitted" token model
     var submittedTokenModel = mvc.Components.get("submitted");
     //Set the submitted threshold as 20. Should match with default value of Dropdown
     var intAdjHours=20;
     submittedTokenModel.on("change:adjhours", function(newTokenName, adjhours, options) {
         if (adjhours !== "undefined") {
            intAdjHours=parseFloat(adjhours);
         }
     });

    // Row Coloring by threshold percentage
    var CustomRangeRenderer = TableView.BaseCellRenderer.extend({
         canRender: function(cell) {
             // Enable this custom cell renderer for perc field
             return _(["perc"]).contains(cell.field);
         },
         render: function($td, cell) {
             // Add a class to the cell based on the returned value
             var value = cell.value;
             value=parseFloat(value);
             // Apply interpretation for perc field
             if (cell.field === "perc") {
                 if (value &amp;gt;= intAdjHours) {
                     $td.addClass("range-cell").addClass("range-severe");
                 }else{
                     $td.addClass("range-cell").addClass("range-low");
                 } 
             }

             // Update the cell content with string perc value
             $td.text(value).addClass("string");
         }
     });

     mvc.Components.get("table1").getVisualization(function(tableView) {
         // Add custom cell renderer, the table will re-render automatically.
         tableView.addCellRenderer(new CustomRangeRenderer());
     });
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 29 Mar 2018 18:11:24 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2018-03-29T18:11:24Z</dc:date>
    <item>
      <title>Is it possible to change color of table cell depending on the dropdown input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-change-color-of-table-cell-depending-on-the/m-p/306415#M19533</link>
      <description>&lt;P&gt;In my dashboard, I have to highlight the cells that have a value greater than the value selected by the user.  I am not sure how to do it.&lt;BR /&gt;
I tried doing the code but it is not working. I have attached the js and xml code below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form script="testexception11.js" stylesheet="ptilecolors.css"&amp;gt;
  &amp;lt;label&amp;gt;newtesttable&amp;lt;/label&amp;gt;
  &amp;lt;fieldset autoRun="true" submitButton="true"&amp;gt;
    &amp;lt;input type="dropdown" token="adjhours" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;test&amp;lt;/label&amp;gt;
      &amp;lt;choice value="100"&amp;gt;100%&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="200"&amp;gt;200%&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="300"&amp;gt;300%&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="1000"&amp;gt;1000%&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="10000"&amp;gt;10000%&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;10000&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table id="hourtab"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index="_internal"|stats count as TOTAL_COUNT by sourcetype&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;JavaScript&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; require([
     'underscore',
     'jquery',
     'splunkjs/mvc',
     'splunkjs/mvc/tableview',
     'splunkjs/mvc/simplexml/ready!'
     ],
 function (_, $, mvc, TableView) {

        // Access the "default" token model
        var tokens = mvc.Components.get("default");

        tokens.on("change:adjhours",function(){
                var hoursvalue=Number(tokens.get("adjhours"));
                console.log("xyz",hoursvalue);

            var renderhourtab = TableView.BaseCellRenderer.extend({
            canRender: function(cell) {
                return true;
            },
            render: function($td, cell) {
                var cellcontent = Number(cell.value);
                if (cell.field == 'TOTAL_COUNT'){           //check if the field name conatins %Adjusted
                    if (cellcontent &amp;gt; hoursvalue){
                        $td.addClass('Red');
                    } 
                    else {
                        $td.addClass('Purple');
                    }
                }
            // Update the cell content
                $td.text(cell.value)
            }   
        });
                 console.log(1);
                var mytab = mvc.Components.get("hourtab");
                mytab.getVisualization(function(tableView){
                    tableView.table.addCellRenderer(new renderhourtab());
                     tableView.table.render();  
                });
                 console.log(2);
        });
         console.log(3);
 });
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Mar 2018 16:38:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-change-color-of-table-cell-depending-on-the/m-p/306415#M19533</guid>
      <dc:creator>ny34940</dc:creator>
      <dc:date>2018-03-28T16:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to change color of table cell depending on the dropdown input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-change-color-of-table-cell-depending-on-the/m-p/306416#M19534</link>
      <description>&lt;P&gt;Try this one,&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/418487/how-to-set-up-table-cell-highlighting-with-differe.html"&gt;https://answers.splunk.com/answers/418487/how-to-set-up-table-cell-highlighting-with-differe.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 18:29:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-change-color-of-table-cell-depending-on-the/m-p/306416#M19534</guid>
      <dc:creator>muralikoppula</dc:creator>
      <dc:date>2018-03-28T18:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to change color of table cell depending on the dropdown input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-change-color-of-table-cell-depending-on-the/m-p/306417#M19535</link>
      <description>&lt;P&gt;Thanks for the reply!&lt;/P&gt;

&lt;P&gt;I have tried to recreate the code as per my requirement, however there are few problems in it. I have to capture the token change event and render the table every time token value is changed. Can you please help me with this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
     'underscore',
     'jquery',
     'splunkjs/mvc',
     'splunkjs/mvc/tableview',
     'splunkjs/mvc/simplexml/ready!'
     ],
function(_, $, mvc, TableView) {

    // Access the "default" token model
    var tokens = mvc.Components.get("default");
    var hoursvalue = Number(tokens.get("adjhours"));
    var renderhourtab = TableView.BaseCellRenderer.extend({
        canRender: function(cell) {
            return true;
        },
        render: function($td, cell) {
            var cellcontent = Number(cell.value);
            if (cell.field == 'TOTAL_COUNT' ){              
                 if (cellcontent &amp;gt; hoursvalue){
                    $td.addClass('Red');
                 }
                else{
                    $td.addClass('Green');
                    }
            }
        // Update the cell content
             $td.text(cell.value)
        }             
    });
        mvc.Components.get('hourtab').getVisualization(function(tableView) {
        tableView.table.addCellRenderer(new renderhourtab());
        tableView.table.render();
        });
        console.log("xyz",hoursvalue);
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Mar 2018 03:26:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-change-color-of-table-cell-depending-on-the/m-p/306417#M19535</guid>
      <dc:creator>ny34940</dc:creator>
      <dc:date>2018-03-29T03:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to change color of table cell depending on the dropdown input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-change-color-of-table-cell-depending-on-the/m-p/306418#M19536</link>
      <description>&lt;P&gt;@ny34940 which version of Splunk are you on?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 13:57:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-change-color-of-table-cell-depending-on-the/m-p/306418#M19536</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-03-29T13:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to change color of table cell depending on the dropdown input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-change-color-of-table-cell-depending-on-the/m-p/306419#M19537</link>
      <description>&lt;P&gt;@ny34940, Please try the following run anywhere example based on Splunk's _internal errors. Please try out and confirm. &lt;/P&gt;

&lt;P&gt;It is setting the default Threshold values as 20%, both in Simple XML dropdown and JavaScript token. On change event of the Threshold Dropdown, the token value is capture and compared for each Percent cell value (&lt;CODE&gt;perc&lt;/CODE&gt;) using CustomRangeRenderer for the table with &lt;CODE&gt;id="table1"&lt;/CODE&gt;. CSS is applied through hidden &lt;CODE&gt;&amp;lt;html&amp;gt;&lt;/CODE&gt; pane (using &lt;CODE&gt;depends&lt;/CODE&gt; attribute with a token which is never set) with &lt;CODE&gt;&amp;lt;style&amp;gt;&lt;/CODE&gt; node within Simple XML.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4681i5D9B2C2AB5BEF700/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
Following is the SImple XML code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form script="table_color_by_dynamic_threshold.js"&amp;gt;
  &amp;lt;label&amp;gt;Change Table Cell Colors based on Drop Down&amp;lt;/label&amp;gt;
  &amp;lt;fieldset autoRun="true" submitButton="true"&amp;gt;
    &amp;lt;input type="time" token="tokTime" searchWhenChanged="false"&amp;gt;
      &amp;lt;label&amp;gt;Select Time&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;-30d@d&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="adjhours" searchWhenChanged="false"&amp;gt;
      &amp;lt;label&amp;gt;Threshold&amp;lt;/label&amp;gt;
      &amp;lt;choice value="20"&amp;gt;20%&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="40"&amp;gt;40%&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="60"&amp;gt;60%&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="80"&amp;gt;80%&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="90"&amp;gt;90%&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;20&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel depends="$alwaysHideCSSPanel$"&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;style&amp;gt;
           /* Tabel Cell Coloring */

           #table1 td.range-low {
               background-color: #65A637 !important;
           }

           #table1 td.range-severe {
               background-color: #D93F3C !important;
           }

           #table1 .table td {
               border-top: 1px solid #fff;
           }
           /* 
           Apply bold font for rows with custom range colors other than Green(default).
           Bold font will ensure that jQuery is working fine to apply appropriate range Class. 
           */
           #table1 td.range-low, td.range-severe{
               font-weight: bold;
           }
        &amp;lt;/style&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Splunk Errors % by Sourcetype&amp;lt;/title&amp;gt;
      &amp;lt;table id="table1"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| metadata type=sourcetypes where index="_internal"
| fields sourcetype totalCount
| eventstats sum(totalCount) as Total
| eval perc=round((totalCount/Total)*100,1)
| fields sourcetype perc
| sort - perc
| eval dummy="$adjhours$"
| fields - dummy&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$tokTime.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$tokTime.latest$&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is the JavaScript code for &lt;CODE&gt;table_color_by_dynamic_threshold.js&lt;/CODE&gt; to be placed under appserver/static folder on your app.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
     "underscore",
     "jquery",
     "splunkjs/mvc",
     "splunkjs/mvc/tableview",
     "splunkjs/mvc/simplexml/ready!"
 ], function(_, $, mvc, TableView) {

     // Access the "submitted" token model
     var submittedTokenModel = mvc.Components.get("submitted");
     //Set the submitted threshold as 20. Should match with default value of Dropdown
     var intAdjHours=20;
     submittedTokenModel.on("change:adjhours", function(newTokenName, adjhours, options) {
         if (adjhours !== "undefined") {
            intAdjHours=parseFloat(adjhours);
         }
     });

    // Row Coloring by threshold percentage
    var CustomRangeRenderer = TableView.BaseCellRenderer.extend({
         canRender: function(cell) {
             // Enable this custom cell renderer for perc field
             return _(["perc"]).contains(cell.field);
         },
         render: function($td, cell) {
             // Add a class to the cell based on the returned value
             var value = cell.value;
             value=parseFloat(value);
             // Apply interpretation for perc field
             if (cell.field === "perc") {
                 if (value &amp;gt;= intAdjHours) {
                     $td.addClass("range-cell").addClass("range-severe");
                 }else{
                     $td.addClass("range-cell").addClass("range-low");
                 } 
             }

             // Update the cell content with string perc value
             $td.text(value).addClass("string");
         }
     });

     mvc.Components.get("table1").getVisualization(function(tableView) {
         // Add custom cell renderer, the table will re-render automatically.
         tableView.addCellRenderer(new CustomRangeRenderer());
     });
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Mar 2018 18:11:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-change-color-of-table-cell-depending-on-the/m-p/306419#M19537</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-03-29T18:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to change color of table cell depending on the dropdown input?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-change-color-of-table-cell-depending-on-the/m-p/306420#M19538</link>
      <description>&lt;P&gt;Thanks a lot for your help!! &lt;/P&gt;</description>
      <pubDate>Sun, 01 Apr 2018 11:59:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-change-color-of-table-cell-depending-on-the/m-p/306420#M19538</guid>
      <dc:creator>ny34940</dc:creator>
      <dc:date>2018-04-01T11:59:34Z</dc:date>
    </item>
  </channel>
</rss>

