<?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: Row Renderer? How to color a whole row when condition is met on one of its cells? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Row-Renderer-How-to-color-a-whole-row-when-condition-is-met-on/m-p/144389#M8743</link>
    <description>&lt;P&gt;I tried to get a hold of its parent using .parent() and .closest('tr') functions, but neither worked. I debugged using chrome and it seems like $td has no parent. Is there some other way to get its parent?&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jul 2014 16:56:27 GMT</pubDate>
    <dc:creator>jamesvz84</dc:creator>
    <dc:date>2014-07-16T16:56:27Z</dc:date>
    <item>
      <title>Row Renderer? How to color a whole row when condition is met on one of its cells?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Row-Renderer-How-to-color-a-whole-row-when-condition-is-met-on/m-p/144385#M8739</link>
      <description>&lt;P&gt;I have used the BaseCellRenderer to color individual cells based on conditions and it had worked great for me.&lt;/P&gt;

&lt;P&gt;Now I need to color a whole row whenever a condition is met on one of its cells.&lt;/P&gt;

&lt;P&gt;Is there some type of Row Renderer I can use to color the table row? If not, what would be the best way to accomplish this?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2014 21:06:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Row-Renderer-How-to-color-a-whole-row-when-condition-is-met-on/m-p/144385#M8739</guid>
      <dc:creator>jamesvz84</dc:creator>
      <dc:date>2014-07-15T21:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Row Renderer? How to color a whole row when condition is met on one of its cells?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Row-Renderer-How-to-color-a-whole-row-when-condition-is-met-on/m-p/144386#M8740</link>
      <description>&lt;P&gt;Are you using Django bindings?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2014 21:20:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Row-Renderer-How-to-color-a-whole-row-when-condition-is-met-on/m-p/144386#M8740</guid>
      <dc:creator>barakreeves</dc:creator>
      <dc:date>2014-07-15T21:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Row Renderer? How to color a whole row when condition is met on one of its cells?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Row-Renderer-How-to-color-a-whole-row-when-condition-is-met-on/m-p/144387#M8741</link>
      <description>&lt;P&gt;No, I am using simple xml with &lt;/P&gt;&lt;FORM script="myjsfile.js"&gt; on top. This allows me to use Javascript to apply a renderer.&lt;P&gt;&lt;/P&gt;&lt;/FORM&gt;</description>
      <pubDate>Tue, 15 Jul 2014 21:30:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Row-Renderer-How-to-color-a-whole-row-when-condition-is-met-on/m-p/144387#M8741</guid>
      <dc:creator>jamesvz84</dc:creator>
      <dc:date>2014-07-15T21:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Row Renderer? How to color a whole row when condition is met on one of its cells?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Row-Renderer-How-to-color-a-whole-row-when-condition-is-met-on/m-p/144388#M8742</link>
      <description>&lt;P&gt;Your JS renderer does have access to the td element, right? If so you may be able to grab hold of its parent, the tr element, and set its CSS or class attributes.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2014 21:44:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Row-Renderer-How-to-color-a-whole-row-when-condition-is-met-on/m-p/144388#M8742</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-15T21:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Row Renderer? How to color a whole row when condition is met on one of its cells?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Row-Renderer-How-to-color-a-whole-row-when-condition-is-met-on/m-p/144389#M8743</link>
      <description>&lt;P&gt;I tried to get a hold of its parent using .parent() and .closest('tr') functions, but neither worked. I debugged using chrome and it seems like $td has no parent. Is there some other way to get its parent?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2014 16:56:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Row-Renderer-How-to-color-a-whole-row-when-condition-is-met-on/m-p/144389#M8743</guid>
      <dc:creator>jamesvz84</dc:creator>
      <dc:date>2014-07-16T16:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: Row Renderer? How to color a whole row when condition is met on one of its cells?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Row-Renderer-How-to-color-a-whole-row-when-condition-is-met-on/m-p/144390#M8744</link>
      <description>&lt;P&gt;Bugger, sounds as if the renderer is getting the td before it's been hung into the DOM tree... and there's no parent selector in CSS either.&lt;/P&gt;

&lt;P&gt;You could move the getting and CSS'ing of the parent into a delayed function, but that'd be quite ugly programming practice. Might work as a QnD temporary solution though.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2014 17:13:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Row-Renderer-How-to-color-a-whole-row-when-condition-is-met-on/m-p/144390#M8744</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-16T17:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Row Renderer? How to color a whole row when condition is met on one of its cells?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Row-Renderer-How-to-color-a-whole-row-when-condition-is-met-on/m-p/144391#M8745</link>
      <description>&lt;P&gt;This is a little complicated because the cell is not put into the DOM so you cannot move up to the parent to style it.&lt;/P&gt;

&lt;P&gt;You can do it with some complicated CSS though. Here's how:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Move or copy the row that has the data that you want to use for declaring how the row will be styled to the first column. If you don't really want it to be the first column, then just include it twice and hide the first one with some CSS (in dashboard.css or application.css).&lt;/LI&gt;
&lt;LI&gt;Add a cell renderer that defines a class that will be used for determining the color of the row; have it put the class information to the first column.&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Add application CSS (in dashboard.css or application.css) that will use &lt;A href="https://developer.mozilla.org/en-US/docs/Web/CSS/Adjacent_sibling_selectors"&gt;adjacent sibling selectors&lt;/A&gt; to style the TD elements based on the class in the first cell. The CSS would look something like this (assuming that your cell renderer applies the class "makerowred" to the first cell):&lt;/P&gt;

&lt;P&gt;/* styles the first cell */&lt;BR /&gt;
td.makerowred{&lt;BR /&gt;
     color: red;&lt;BR /&gt;
}&lt;/P&gt;

&lt;P&gt;/* styles the second cell */&lt;BR /&gt;
td.makerowred + td{&lt;BR /&gt;
     color: red;&lt;BR /&gt;
}&lt;/P&gt;

&lt;P&gt;/* styles the third cell */&lt;BR /&gt;
td.makerowred + td + td{&lt;BR /&gt;
     color: red;&lt;BR /&gt;
}&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Wed, 16 Jul 2014 18:50:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Row-Renderer-How-to-color-a-whole-row-when-condition-is-met-on/m-p/144391#M8745</guid>
      <dc:creator>LukeMurphey</dc:creator>
      <dc:date>2014-07-16T18:50:39Z</dc:date>
    </item>
  </channel>
</rss>

