<?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: Single Value visualization - Display text with color in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477873#M31367</link>
    <description>&lt;P&gt;Thank you. But I am getting an error as &lt;STRONG&gt;&lt;EM&gt;Error in 'stats' command: The argument 'vvalues(range)' is invalid.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I wan to create this as report first and then add into dashboard. Is this possible or I need to directly add this code in dashboard ?&lt;/P&gt;</description>
    <pubDate>Sun, 19 Apr 2020 07:24:58 GMT</pubDate>
    <dc:creator>purushot1234</dc:creator>
    <dc:date>2020-04-19T07:24:58Z</dc:date>
    <item>
      <title>Single Value visualization - Display text with color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477869#M31363</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a single value chart where I will be showing if Node is UP or DOWN. I want to show the color green with text display as UP and red color with text value as DOWN.&lt;/P&gt;

&lt;P&gt;However single value visualization needs numeric value to show the color, how do I change the display to text - UP or DOWN.&lt;/P&gt;

&lt;P&gt;Below code display number 1 or 0 with green/red color but I want to display UP/DOWN. What code changes I need to do ?&lt;/P&gt;

&lt;P&gt;index=datagov source=node_log&lt;BR /&gt;
| eval service_up = if(_raw like "%successfully%",1,0)&lt;BR /&gt;
| stats values(service_up) as Availibilty&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:02:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477869#M31363</guid>
      <dc:creator>purushot1234</dc:creator>
      <dc:date>2020-09-30T05:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Single Value visualization - Display text with color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477870#M31364</link>
      <description>&lt;P&gt;@purushot1234 refer to one of my older answer with couple of options: &lt;A href="https://answers.splunk.com/answers/595910/how-to-build-a-dashboard-with-single-panel-value-b.html"&gt;https://answers.splunk.com/answers/595910/how-to-build-a-dashboard-with-single-panel-value-b.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You can also use &lt;CODE&gt;&amp;lt;html&amp;gt;&lt;/CODE&gt; panel for Single Value Color based on text.&lt;/P&gt;

&lt;P&gt;In case you are interested in Drilldown from Status Indicator or html panel, refer to my older answer: &lt;A href="https://answers.splunk.com/answers/746858/do-trellis-also-have-drilldown-capability.html"&gt;https://answers.splunk.com/answers/746858/do-trellis-also-have-drilldown-capability.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 06:21:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477870#M31364</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-04-19T06:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Single Value visualization - Display text with color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477871#M31365</link>
      <description>&lt;P&gt;Thank you but I didn't understand it clearly as I am new to Splunk. Could you please help me in my search ? Below is the search I am using in a report which display 1 or 0 with Green/Red color. But I want display as UP or DOWN. What extra code I need to add below ? Thank you&lt;/P&gt;

&lt;P&gt;index=datagov source=node_log&lt;BR /&gt;
| eval service_up = if(_raw like "%successfully%",1,0)&lt;BR /&gt;
| stats values(service_up) as Availability by node&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:02:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477871#M31365</guid>
      <dc:creator>purushot1234</dc:creator>
      <dc:date>2020-09-30T05:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Single Value visualization - Display text with color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477872#M31366</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=datagov source=node_log
| eval range = if(searchmatch("successfully"),"severe","low")
| eval Availability = if(range="severe","UP","Down")
| stats values(range) as range by node Availability
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;options:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;option name="colorBy"&amp;gt;value&amp;lt;/option&amp;gt;
    &amp;lt;option name="colorMode"&amp;gt;none&amp;lt;/option&amp;gt;
    &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
    &amp;lt;option name="field"&amp;gt;Availability&amp;lt;/option&amp;gt;
    &amp;lt;option name="numberPrecision"&amp;gt;0&amp;lt;/option&amp;gt;
    &amp;lt;option name="rangeColors"&amp;gt;["0x65a637,"0xd93f3c"]&amp;lt;/option&amp;gt;
    &amp;lt;option name="rangeValues"&amp;gt;[0]&amp;lt;/option&amp;gt;
    &amp;lt;option name="trellis.enabled"&amp;gt;1&amp;lt;/option&amp;gt;
    &amp;lt;option name="trellis.splitBy"&amp;gt;node&amp;lt;/option&amp;gt;
    &amp;lt;option name="useColors"&amp;gt;0&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 19 Apr 2020 07:06:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477872#M31366</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-19T07:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Single Value visualization - Display text with color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477873#M31367</link>
      <description>&lt;P&gt;Thank you. But I am getting an error as &lt;STRONG&gt;&lt;EM&gt;Error in 'stats' command: The argument 'vvalues(range)' is invalid.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I wan to create this as report first and then add into dashboard. Is this possible or I need to directly add this code in dashboard ?&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 07:24:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477873#M31367</guid>
      <dc:creator>purushot1234</dc:creator>
      <dc:date>2020-04-19T07:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: Single Value visualization - Display text with color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477874#M31368</link>
      <description>&lt;P&gt;sorry, here is typo. I fix it.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;Is this possible or I need to directly add this code in dashboard&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;yes&lt;BR /&gt;
you can do it.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 07:44:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477874#M31368</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-19T07:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Single Value visualization - Display text with color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477875#M31369</link>
      <description>&lt;P&gt;Thank you very much. I am getting the text now with desired color.  But I want display as a box with red color and text inside with white color. So when I chose &lt;STRONG&gt;&lt;EM&gt;use color&lt;/EM&gt;&lt;/STRONG&gt; yes and chose  &lt;STRONG&gt;&lt;EM&gt;color mode&lt;/EM&gt;&lt;/STRONG&gt; format option to show box, it shows black color box. How do I show red or green box with text (white color) inside&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 08:25:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477875#M31369</guid>
      <dc:creator>purushot1234</dc:creator>
      <dc:date>2020-04-19T08:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Single Value visualization - Display text with color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477876#M31370</link>
      <description>&lt;P&gt;you should modify &lt;CODE&gt;source&lt;/CODE&gt; not GUI&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 08:32:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477876#M31370</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-19T08:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Single Value visualization - Display text with color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477877#M31371</link>
      <description>&lt;P&gt;Thank you. So what options I need to add in source for this ? Shall I create the report as above and then add additional options to show it in box with color and white text ? If you could please let me know those options that I need to add in source then that would be great. Sorry for too many queries.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 08:37:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477877#M31371</guid>
      <dc:creator>purushot1234</dc:creator>
      <dc:date>2020-04-19T08:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Single Value visualization - Display text with color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477878#M31372</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;title&amp;gt;Option 2 - Using Single Value&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults
           | eval status=mvindex(split("UP DOWN"," "),(random() % 2)) 
 | eval range=if(status="DOWN" ,"severe", "low")
 | stats count by status range&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="colorBy"&amp;gt;value&amp;lt;/option&amp;gt;
        &amp;lt;option name="colorMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="field"&amp;gt;status&amp;lt;/option&amp;gt;
        &amp;lt;option name="numberPrecision"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeColors"&amp;gt;["0x65a637,"0xd93f3c"]&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeValues"&amp;gt;[0]&amp;lt;/option&amp;gt;
        &amp;lt;option name="useColors"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="useThousandSeparators"&amp;gt;1&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this is sample.&lt;/P&gt;

&lt;P&gt;reference:&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 08:47:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477878#M31372</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-19T08:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: Single Value visualization - Display text with color</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477879#M31373</link>
      <description>&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 09:24:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-Value-visualization-Display-text-with-color/m-p/477879#M31373</guid>
      <dc:creator>purushot1234</dc:creator>
      <dc:date>2020-04-19T09:24:54Z</dc:date>
    </item>
  </channel>
</rss>

