<?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: color a column based on its content using xml code in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/color-a-column-based-on-its-content-using-xml-code/m-p/460371#M30212</link>
    <description>&lt;P&gt;@ramyaashok &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;dashboard&amp;gt;
      &amp;lt;label&amp;gt;Color Cell&amp;lt;/label&amp;gt;
      &amp;lt;row&amp;gt;
        &amp;lt;panel&amp;gt;
          &amp;lt;table&amp;gt;
            &amp;lt;search&amp;gt;
              &amp;lt;query&amp;gt;| makeresults | eval status="successful,unsuccessful",status=split(status,",")| mvexpand status&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;/search&amp;gt;
            &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
            &amp;lt;format type="color" field="status"&amp;gt;
              &amp;lt;colorPalette type="map"&amp;gt;{"successful":#00FF00,"unsuccessful":#FF0000}&amp;lt;/colorPalette&amp;gt;
            &amp;lt;/format&amp;gt;
          &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Refer: &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.1/Viz/TableFormatsXML#Table_format_source_code_example"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.1/Viz/TableFormatsXML#Table_format_source_code_example&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Mar 2020 15:53:34 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2020-03-27T15:53:34Z</dc:date>
    <item>
      <title>color a column based on its content using xml code</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/color-a-column-based-on-its-content-using-xml-code/m-p/460370#M30211</link>
      <description>&lt;P&gt;i have a column status, which will have a message saying "successful" or "unsuccessful", &lt;BR /&gt;
i want to color the cell green that has successful message&lt;BR /&gt;
else if unsuccessful color it red.&lt;/P&gt;

&lt;P&gt;please help me with the code&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 10:47:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/color-a-column-based-on-its-content-using-xml-code/m-p/460370#M30211</guid>
      <dc:creator>ramyaashok</dc:creator>
      <dc:date>2020-03-27T10:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: color a column based on its content using xml code</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/color-a-column-based-on-its-content-using-xml-code/m-p/460371#M30212</link>
      <description>&lt;P&gt;@ramyaashok &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;dashboard&amp;gt;
      &amp;lt;label&amp;gt;Color Cell&amp;lt;/label&amp;gt;
      &amp;lt;row&amp;gt;
        &amp;lt;panel&amp;gt;
          &amp;lt;table&amp;gt;
            &amp;lt;search&amp;gt;
              &amp;lt;query&amp;gt;| makeresults | eval status="successful,unsuccessful",status=split(status,",")| mvexpand status&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;/search&amp;gt;
            &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
            &amp;lt;format type="color" field="status"&amp;gt;
              &amp;lt;colorPalette type="map"&amp;gt;{"successful":#00FF00,"unsuccessful":#FF0000}&amp;lt;/colorPalette&amp;gt;
            &amp;lt;/format&amp;gt;
          &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Refer: &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.1/Viz/TableFormatsXML#Table_format_source_code_example"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.1/Viz/TableFormatsXML#Table_format_source_code_example&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 15:53:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/color-a-column-based-on-its-content-using-xml-code/m-p/460371#M30212</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-03-27T15:53:34Z</dc:date>
    </item>
  </channel>
</rss>

