<?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 How to apply a default colour to a single-line visual box with text instead of numbers in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-apply-a-default-colour-to-a-single-line-visual-box-with/m-p/268187#M16966</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I need to change the default colour of a group of single line visuals..They are pulling in text from a lookup.. The default colour needs to be red, not black, but as there are no numeric values, the range obviously doesnt work. &lt;/P&gt;

&lt;P&gt;Any thoughts on how I can set a default colour?&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2016 13:31:54 GMT</pubDate>
    <dc:creator>mansel_scheffel</dc:creator>
    <dc:date>2016-07-21T13:31:54Z</dc:date>
    <item>
      <title>How to apply a default colour to a single-line visual box with text instead of numbers</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-apply-a-default-colour-to-a-single-line-visual-box-with/m-p/268187#M16966</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I need to change the default colour of a group of single line visuals..They are pulling in text from a lookup.. The default colour needs to be red, not black, but as there are no numeric values, the range obviously doesnt work. &lt;/P&gt;

&lt;P&gt;Any thoughts on how I can set a default colour?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 13:31:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-apply-a-default-colour-to-a-single-line-visual-box-with/m-p/268187#M16966</guid>
      <dc:creator>mansel_scheffel</dc:creator>
      <dc:date>2016-07-21T13:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply a default colour to a single-line visual box with text instead of numbers</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-apply-a-default-colour-to-a-single-line-visual-box-with/m-p/268188#M16967</link>
      <description>&lt;P&gt;I'm not sure what single-line visual is, but if you have it in a dashboard you can deal with options in SimpleXML:&lt;BR /&gt;
try to  add &lt;BR /&gt;
&lt;CODE&gt;&amp;lt;option name="charting.seriesColors"&amp;gt;[990000]&amp;lt;/option&amp;gt;&lt;/CODE&gt;to your chart &lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.1/Viz/ChartConfigurationReference"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.1/Viz/ChartConfigurationReference&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 14:38:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-apply-a-default-colour-to-a-single-line-visual-box-with/m-p/268188#M16967</guid>
      <dc:creator>MaryvonneMB</dc:creator>
      <dc:date>2016-07-21T14:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply a default colour to a single-line visual box with text instead of numbers</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-apply-a-default-colour-to-a-single-line-visual-box-with/m-p/268189#M16968</link>
      <description>&lt;P&gt;One approach would be to add something like the following to the end of your query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval color=1 | rangemap field=color default=severe   
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and add this option to your single value XML:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="classField"&amp;gt;color&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Below is a complete example that worked for me:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;single&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;index=_internal | head 1 | eval myday=strftime(_time,"%A")             
        | fields myday          
        | eval color=1 | rangemap field=color default=severe 
      &amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;&amp;lt;/latest&amp;gt;
    &amp;lt;/search&amp;gt;
    &amp;lt;option name="classField"&amp;gt;color&amp;lt;/option&amp;gt;
  &amp;lt;/single&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is a variation of an approach that is described here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/103239/change-color-of-single-value-visualization.html"&gt;https://answers.splunk.com/answers/103239/change-color-of-single-value-visualization.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Depending on how comfortable you are with CSS, another approach would be to include a custom CSS file that overrides the single-result class.  &lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 15:10:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-apply-a-default-colour-to-a-single-line-visual-box-with/m-p/268189#M16968</guid>
      <dc:creator>kbarker302</dc:creator>
      <dc:date>2016-07-21T15:10:48Z</dc:date>
    </item>
  </channel>
</rss>

