<?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: How to change the color of specific columns in a table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316167#M94647</link>
    <description>&lt;P&gt;You can use tokens to select the column number based on the value in your select box..&lt;BR /&gt;&lt;BR /&gt;
And use the UI suggestion mentioned in @mayurr98 colur..it..&lt;/P&gt;

&lt;P&gt;Normally when we change some setting in UI, it will add/change a property to you dashboard xml something like below,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="column.number"&amp;gt;0&amp;lt;/option&amp;gt;
&amp;lt;option name="column.color"&amp;gt;#ffff&amp;lt;/option&amp;gt;
or 
&amp;lt;option name="column.color"&amp;gt;[0: "#FFF", 2:"#6767"]&amp;lt;/option &amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can add an on-change event to your select box and set a token with the value of the column number&lt;BR /&gt;
Please go through "Conditional operations with form inputs" section &lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/6.6.3/Viz/tokens#Conditional_operations_with_form_inputs"&gt;here&lt;/A&gt; for attaching change event and setting token..&lt;/P&gt;

&lt;P&gt;now you can use the taken as belwo&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="column.number"&amp;gt;$token_name$&amp;lt;/option&amp;gt;
&amp;lt;option name="column.color"&amp;gt;#ffff&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 16 Jan 2018 09:09:03 GMT</pubDate>
    <dc:creator>paramagurukarth</dc:creator>
    <dc:date>2018-01-16T09:09:03Z</dc:date>
    <item>
      <title>How to change the color of specific columns in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316160#M94640</link>
      <description>&lt;P&gt;What I want to do is add color formatting to multiple columns of a table depending upon the name of the columns.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;       &amp;lt;format type="color" field="count"&amp;gt;
      &amp;lt;colorPalette type="minMidMax" maxColor="#31A35F" midColor="#A2CC3E" minColor="#FFFFFF"&amp;gt;&amp;lt;/colorPalette&amp;gt;
      &amp;lt;scale type="minMidMax" maxType="percentile" maxValue="100" midType="percentile" midValue="50" minType="percentile" minValue="0"&amp;gt;&amp;lt;/scale&amp;gt;
    &amp;lt;/format&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The above code changes only one column, how to extend this formatting to all the columns containing count in the column header?&lt;/P&gt;

&lt;P&gt;Edit: I want to know if we could add multiple fields in a single format tag ?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2018 16:55:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316160#M94640</guid>
      <dc:creator>ny34940</dc:creator>
      <dc:date>2018-01-15T16:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the color of specific columns in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316161#M94641</link>
      <description>&lt;P&gt;hey @ny34940&lt;/P&gt;

&lt;P&gt;Why do not you do it on UI itself&lt;/P&gt;

&lt;P&gt;If you a 6.5.X splunk version, you can click a brush on the right in every column to color by the value or you can just color entire column of the table&lt;BR /&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/4179i1F9C7C9104B0B1A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2018 17:07:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316161#M94641</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-15T17:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the color of specific columns in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316162#M94642</link>
      <description>&lt;P&gt;Actually the columns of the table can be changed(increased or decreased) based on the dropdowns but the column headers always end with same word.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2018 17:19:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316162#M94642</guid>
      <dc:creator>ny34940</dc:creator>
      <dc:date>2018-01-15T17:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the color of specific columns in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316163#M94643</link>
      <description>&lt;P&gt;do you want to change the color of column name? &lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2018 17:53:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316163#M94643</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-15T17:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the color of specific columns in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316164#M94644</link>
      <description>&lt;P&gt;No I want to change the color of the whole column. &lt;/P&gt;

&lt;P&gt;Suppose this is my table depending on one input field&lt;BR /&gt;
Name     Nov-AVG        Nov-Count     Oct-AVG    Oct-Count &lt;/P&gt;

&lt;P&gt;It could be changed to this as well&lt;BR /&gt;
Name     Oct-AVG    Oct-Count   Sep-AVG      Sep-Count&lt;/P&gt;

&lt;P&gt;Now I want to change the color of all the &lt;STRONG&gt;count&lt;/STRONG&gt; columns. The table above can be changed depending on the dropdown. The data can be of any other months but for each month we have 2 columns(avg and count) and I want to add color formatting to only the count columns.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 01:29:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316164#M94644</guid>
      <dc:creator>ny34940</dc:creator>
      <dc:date>2018-01-16T01:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the color of specific columns in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316165#M94645</link>
      <description>&lt;P&gt;It will not change according to deopdown . If you see my entire column is &lt;CODE&gt;red&lt;/CODE&gt;. Can you &lt;CODE&gt;close&lt;/CODE&gt; mark near colors . You can exit multiple colors and keep only one color. And you can customize that color by clicking on it. And put the hex cold of the color you want. So for that column there will only be one color. You can adjust the option according to your need. Its not only based on values in the dropdpwn. You can make it a way to color entire column . &lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 03:37:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316165#M94645</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-16T03:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the color of specific columns in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316166#M94646</link>
      <description>&lt;P&gt;I understand what you saying but my requirements are different. What I want to know is if we could add multiple fields in a single format tag?&lt;/P&gt;

&lt;P&gt;Something like this &lt;BR /&gt;
format type="color" field="Nov-Count" or "Oct-Count"&lt;/P&gt;

&lt;P&gt;or this&lt;BR /&gt;
format type="color" field=*"count"&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 05:59:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316166#M94646</guid>
      <dc:creator>ny34940</dc:creator>
      <dc:date>2018-01-16T05:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the color of specific columns in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316167#M94647</link>
      <description>&lt;P&gt;You can use tokens to select the column number based on the value in your select box..&lt;BR /&gt;&lt;BR /&gt;
And use the UI suggestion mentioned in @mayurr98 colur..it..&lt;/P&gt;

&lt;P&gt;Normally when we change some setting in UI, it will add/change a property to you dashboard xml something like below,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="column.number"&amp;gt;0&amp;lt;/option&amp;gt;
&amp;lt;option name="column.color"&amp;gt;#ffff&amp;lt;/option&amp;gt;
or 
&amp;lt;option name="column.color"&amp;gt;[0: "#FFF", 2:"#6767"]&amp;lt;/option &amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can add an on-change event to your select box and set a token with the value of the column number&lt;BR /&gt;
Please go through "Conditional operations with form inputs" section &lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/6.6.3/Viz/tokens#Conditional_operations_with_form_inputs"&gt;here&lt;/A&gt; for attaching change event and setting token..&lt;/P&gt;

&lt;P&gt;now you can use the taken as belwo&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="column.number"&amp;gt;$token_name$&amp;lt;/option&amp;gt;
&amp;lt;option name="column.color"&amp;gt;#ffff&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jan 2018 09:09:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316167#M94647</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2018-01-16T09:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the color of specific columns in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316168#M94648</link>
      <description>&lt;P&gt;This option name="column.color" is not available in simple XML.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 03:40:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316168#M94648</guid>
      <dc:creator>ny34940</dc:creator>
      <dc:date>2018-01-17T03:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the color of specific columns in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316169#M94649</link>
      <description>&lt;P&gt;Bro.. I don't  have 6.5.X version of splunk installed in my machine.. so don't know the exact option corresponding to the setting mentioned in @ny34940 's answer...&lt;/P&gt;

&lt;P&gt;If you have that versin installed please do that settings and use the suggested token.... Or else ther is one straight away solution &lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.5.0/Viz/TableFormatsXML#Color_palette_types_and_options"&gt;here&lt;/A&gt;.. please use that &lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 12:34:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316169#M94649</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2018-01-18T12:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the color of specific columns in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316170#M94650</link>
      <description>&lt;P&gt;Thank you for the reply. I think my question was not clear. Sorry my bad. Please read the below description and suggest any solution.&lt;/P&gt;

&lt;P&gt;My query is something like this&lt;/P&gt;

&lt;P&gt;[base search]| chart count() as A sum() as B avg() as C by type month&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Here the months are the user input so can be changed&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;I can get a table like this&lt;/P&gt;

&lt;P&gt;Type  Jan18:A    Jan18:B    Jan18:C   Nov17: A  Nov17:B  Nov17: C &lt;BR /&gt;
  car&lt;/P&gt;

&lt;P&gt;or maybe like this&lt;/P&gt;

&lt;P&gt;Type  Feb18:A  Feb18:B    Feb18:C  Jan18:A    Jan18:B    Jan18:C   Dec17: A  Dec17:B  Dec17: C &lt;/P&gt;

&lt;P&gt;Now I want to highlight the columns having this data &lt;STRONG&gt;avg() as C&lt;/STRONG&gt;. As you can see the name and number of columns is dynamic and in future data of new months will be added as well. As the columns are changing , I have to edit every time data of new month is added. So I was asking if there is any other efficient way to do that like applying format condition on all the columns ending with a string *&lt;EM&gt;:C *&lt;/EM&gt;?&lt;/P&gt;

&lt;P&gt;I tried using this but obviously it didn't work.&lt;/P&gt;

&lt;P&gt;format type="color" field=*"C"&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 18:14:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/316170#M94650</guid>
      <dc:creator>ny34940</dc:creator>
      <dc:date>2018-01-18T18:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the color of specific columns in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/529799#M149668</link>
      <description>&lt;P&gt;Did you ever find this answer?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 17:39:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-color-of-specific-columns-in-a-table/m-p/529799#M149668</guid>
      <dc:creator>tefa627</dc:creator>
      <dc:date>2020-11-17T17:39:45Z</dc:date>
    </item>
  </channel>
</rss>

