<?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: Colorize SimpleResultsTable rows based on dynamic field values in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Colorize-SimpleResultsTable-rows-based-on-dynamic-field-values/m-p/18441#M43694</link>
    <description>&lt;P&gt;Luke,&lt;BR /&gt;
I am planning to have 8 CSS classes (8 background colors). As I mentioned in above comment, I am unaware of number of unique values possible for "dest" column, It may be 50 or 100. I am planning to apply 8 CSS classes for first 8 unique "dest" column values and for 9th unique value 1st(first) CSS class...10th unique value, 2nd CSS class...and so on (That means, I am planning to repeat CSS classes across all values).&lt;/P&gt;

&lt;P&gt;Am I making sense here?&lt;/P&gt;</description>
    <pubDate>Thu, 02 May 2013 05:58:15 GMT</pubDate>
    <dc:creator>kasu_praveen</dc:creator>
    <dc:date>2013-05-02T05:58:15Z</dc:date>
    <item>
      <title>Colorize SimpleResultsTable rows based on dynamic field values</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Colorize-SimpleResultsTable-rows-based-on-dynamic-field-values/m-p/18437#M43690</link>
      <description>&lt;P&gt;I have a simple table on a dashboard which has various bits of info. In particular, there is a "dest" column. I'd like to colorize each row according to the dest value. Values of "dest" column are dynamic. I have seen almost similar kind of thread &lt;A href="http://splunk-base.splunk.com/answers/60993/colorize-simpleresultstable-rows-based-on-field-values"&gt;here&lt;/A&gt;, but that is of static values (we know there will be only 3 values of severity column). I am looking for something of dynamic values (Not sure how many dest are possible).   &lt;/P&gt;

&lt;P&gt;And, I am fine with defining just 5 background colors (5 CSS classes) and assign first color for 6th "dest" value, 2nd color for 7th "dest" value....and so on&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2013 10:40:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Colorize-SimpleResultsTable-rows-based-on-dynamic-field-values/m-p/18437#M43690</guid>
      <dc:creator>kasu_praveen</dc:creator>
      <dc:date>2013-04-29T10:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Colorize SimpleResultsTable rows based on dynamic field values</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Colorize-SimpleResultsTable-rows-based-on-dynamic-field-values/m-p/18438#M43691</link>
      <description>&lt;P&gt;See "&lt;A href="http://splunk-base.splunk.com/answers/83206/color-in-a-table-based-on-values"&gt;Color in a table based on values&lt;/A&gt;" for a method that allows you to colorize cells based on the contents. This works in simple and advanced XML.&lt;/P&gt;

&lt;P&gt;You may want to take this a step further and colorize a cell based on the value of a previous cell. This is useful when you want a to stylize a cell according to something on the server (but not based solely on the contents of one cell). This technique would allow you to stylize a cell based on a value pulled in from a lookup.&lt;/P&gt;

&lt;P&gt;For example, you could include a column called &lt;STRONG&gt;dest_class&lt;/STRONG&gt; in your view and then use this column to indicate how the &lt;STRONG&gt;dest&lt;/STRONG&gt; column ought to be stylized. You can do this via CSS once you are using the application.js specified in the other Splunk-Base answer above:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Define CSS to stylize the column next to the dest_class column&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;This CSS will style the cell in the column just after the "dest_class" column if "dest_class" is set to "internal":&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.splView-YOUR_VIEW_NAME .SimpleResultsTable tr td.d[data-value="internal"][field="dest_class"] + td
{
    color: #C42323;
    font-weight: bold;
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should be placed in $SPLUNK_HOME/etc/apps/YOUR_APP/appserver/static/application.css.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Defined CSS to hide the dest_class column&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;There is a good chance that may want to hide the column that you are using to stylize the other column. You can do this with a little CSS. Note that this examples assumes that the column you want to hide is the 8th column (modify per your view):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.splView-YOUR_VIEW_NAME .SimpleResultsTable tr td:nth-of-type(8),
.splView-YOUR_VIEW_NAME .SimpleResultsTable tr th:nth-of-type(8){
     display:none;   
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See &lt;A href="https://github.com/LukeMurphey/splunk-website-monitoring/blob/master/src/appserver/static/application.css"&gt;https://github.com/LukeMurphey/splunk-website-monitoring/blob/master/src/appserver/static/application.css&lt;/A&gt; for an example of application.css where this techique is being used.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2013 17:16:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Colorize-SimpleResultsTable-rows-based-on-dynamic-field-values/m-p/18438#M43691</guid>
      <dc:creator>LukeMurphey</dc:creator>
      <dc:date>2013-04-29T17:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Colorize SimpleResultsTable rows based on dynamic field values</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Colorize-SimpleResultsTable-rows-based-on-dynamic-field-values/m-p/18439#M43692</link>
      <description>&lt;P&gt;Luke, Thanks for taking time.This looks good, I think this works only if I know what values are possible for "dest" column. &lt;/P&gt;

&lt;P&gt;But in my case I don't know what field values are possible for "dest" column. There may be 50 or 100 or more different values possible.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 06:14:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Colorize-SimpleResultsTable-rows-based-on-dynamic-field-values/m-p/18439#M43692</guid>
      <dc:creator>kasu_praveen</dc:creator>
      <dc:date>2013-04-30T06:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Colorize SimpleResultsTable rows based on dynamic field values</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Colorize-SimpleResultsTable-rows-based-on-dynamic-field-values/m-p/18440#M43693</link>
      <description>&lt;P&gt;Can you let me know how you want to determine the style of the cell? I am unclear how you are going to stylize the contents based on the values if you don't have some knowledge about the potential values (I'm guessing you have some technique in mind).&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 15:17:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Colorize-SimpleResultsTable-rows-based-on-dynamic-field-values/m-p/18440#M43693</guid>
      <dc:creator>LukeMurphey</dc:creator>
      <dc:date>2013-04-30T15:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Colorize SimpleResultsTable rows based on dynamic field values</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Colorize-SimpleResultsTable-rows-based-on-dynamic-field-values/m-p/18441#M43694</link>
      <description>&lt;P&gt;Luke,&lt;BR /&gt;
I am planning to have 8 CSS classes (8 background colors). As I mentioned in above comment, I am unaware of number of unique values possible for "dest" column, It may be 50 or 100. I am planning to apply 8 CSS classes for first 8 unique "dest" column values and for 9th unique value 1st(first) CSS class...10th unique value, 2nd CSS class...and so on (That means, I am planning to repeat CSS classes across all values).&lt;/P&gt;

&lt;P&gt;Am I making sense here?&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2013 05:58:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Colorize-SimpleResultsTable-rows-based-on-dynamic-field-values/m-p/18441#M43694</guid>
      <dc:creator>kasu_praveen</dc:creator>
      <dc:date>2013-05-02T05:58:15Z</dc:date>
    </item>
  </channel>
</rss>

